Documentation ¶
Index ¶
Constants ¶
View Source
const TableNameLog = "logs"
View Source
const TableNameTiku = "tiku"
View Source
const TableNameUser = "users"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Log ¶
type Log struct { ID int32 `gorm:"type:integer primary key autoincrement" json:"id"` Qid int32 `gorm:"column:qid;type:int(11);not null;comment:被修改的qid" json:"qid"` // 被修改的qid OldAnswer string `gorm:"column:old_answer;type:longtext;not null;comment:修改之前的答案" json:"old_answer"` // 修改之前的答案 NewAnswer string `gorm:"column:new_answer;type:longtext;not null;comment:修改之后的答案" json:"new_answer"` // 修改之后的答案 UserID int32 `gorm:"column:user_id;type:int(11);not null;comment:谁修改的答案" json:"user_id"` // 谁修改的答案 CreateTime time.Time `gorm:"column:create_time;type:datetime;not null;comment:修改日期" json:"create_time"` // 修改日期 Action int32 `gorm:"column:action;type:tinyint(4);not null;comment:新增0更新1删除2" json:"action"` // 新增0更新1删除2 }
Log mapped from table <logs>
type Tiku ¶
type Tiku struct { ID int32 `gorm:"type:integer primary key autoincrement" json:"id"` Question string `gorm:"column:question;type:longtext;not null;comment:问题内容" json:"question"` // 问题内容 Type int32 `gorm:"column:type;type:int(11);not null;comment:问题类型" json:"type"` // 问题类型 Options string `gorm:"column:options;type:longtext;not null;comment:选项内容" json:"options"` // 选项内容 Answer string `gorm:"column:answer;type:longtext;not null;comment:正确答案" json:"answer"` // 正确答案 Plat int32 `gorm:"column:plat;type:int(11);not null;comment:有可能区分不同的平台不同的题库" json:"plat"` // 有可能区分不同的平台不同的题库 Hash string `` // 整个实体的hash,防止重复 /* 128-byte string literal not displayed */ CourseName string `gorm:"column:course_name;type:varchar(255);comment:课程名称" json:"course_name"` // 课程名称 Extra string `gorm:"column:extra;type:text;comment:扩展字段,多用于tag" json:"extra"` // 扩展字段,多用于tag }
Tiku mapped from table <tiku>
type User ¶
type User struct { ID int32 `gorm:"type:integer primary key autoincrement" json:"id"` Username string `gorm:"column:username;type:varchar(255)" json:"username"` Password string `gorm:"column:password;type:varchar(255)" json:"password"` Perms string `gorm:"column:perms;type:varchar(255)" json:"perms"` ParentID int32 `gorm:"column:parent_id;type:int(11)" json:"parent_id"` Nickname string `gorm:"column:nickname;type:varchar(255)" json:"nickname"` }
User mapped from table <users>
Click to show internal directories.
Click to hide internal directories.