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.

14 lines
976 B

package model
type Searchlog struct {
Id int64 `json:"id" gorm:"column:sea_id;type:bigint(20);;primaryKey;unique;not null;autoIncrement;index"`
Cont string `json:"cont" gorm:"column:sea_cont;type:varchar(255);not null;comment:关键词"` //'关键词',
UserKey int64 `json:"userkey" gorm:"column:sea_user_key;type:bigint(20) unsigned;default:0;not null;comment:搜索人"` //'搜索人',
Num int8 `json:"num" gorm:"column:sea_num;type:int(5) unsigned;default:1;not null;comment:'搜索次数'"` //'搜索次数',
Time int64 `json:"time" gorm:"column:sea_time;type:bigint(20) unsigned;default:0;not null;comment:时间"` //'时间',
State int8 `json:"state" gorm:"column:sea_state;type:tinyint(1) unsigned;default:1;not null;comment:'状态(1:启用,2:删除)'"` //'1:启用,2:删除',
}
func (searchlog *Searchlog) TableName() string {
return "searchlog"
}