package ticket import "time" type Ticket struct { Id int64 `json:"id" db:"id" gorm:"primaryKey;autoIncrement"` Content string `json:"content" db:"content" gorm:"column:content;not null"` FromQQ int64 `json:"fromQQ" db:"fromQQ" gorm:"column:fromQQ;not null"` FromGroup int64 `json:"fromGroup" db:"fromGroup" gorm:"column:fromGroup"` IsDone bool `json:"isDone" db:"isDone" gorm:"column:isDone;default:false"` IsDeleted bool `json:"isDeleted" db:"isDeleted" gorm:"column:isDeleted;default:false"` CreatedAt time.Time `json:"created_at" db:"created_at" gorm:"column:created_at;autoCreateTime"` } // TableName 指定表名 func (Ticket) TableName() string { return "ticket" } type WebTicketModel struct { Id int64 `json:"id"` Content string `json:"content"` FromQQ string `json:"from"` CreatedAt string `json:"created_at"` }