gorm测试实验
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
971 B

package model
type Answer struct {
Id int64 `json:"id" gorm:"column:a_id;type:bigint(20);;primaryKey;unique;not null;autoIncrement;index"`
Text string `json:"text" gorm:"column:a_text;type:text;not null;comment:答案"` //'答案',
TrueFalse int8 `json:"truefalse" gorm:"column:a_true_false;type:tinyint(1) unsigned;default:1;not null;comment:是否为正确答案(1:正确;2:错误)"` //'是否为正确答案(1:正确;2:错误)',
Type int8 `json:"type" gorm:"column:a_type;type:tinyint(1) unsigned;default:1;not null;comment:是否为正确答案(1:正确;2:错误)"` //'类型(1:单选;2:多选;3:判断)',
Key int64 `json:"key" gorm:"column:a_key;type:bigint(50) unsigned;default:0;not null;comment:创建人"` //'唯一识别符',
}
func (Answer *Answer) TableName() string {
return "answer"
}