feat(smoke): support reason tags on smoke logs

This commit is contained in:
nepiedg
2026-04-16 11:06:14 +08:00
parent 411ded8a0c
commit 6e0a06cfcf
8 changed files with 158 additions and 65 deletions
+2 -1
View File
@@ -16,7 +16,8 @@ type SmokeLog struct {
// smoke_at:真实抽烟时间(可补录,精确到时分秒)
SmokeAt *time.Time `gorm:"column:smoke_at;type:datetime;comment:真实抽烟时间(精确到秒)" json:"smoke_at,omitempty"`
Remark string `gorm:"column:remark;type:text;comment:原因/备注" json:"remark,omitempty"`
Remark string `gorm:"column:remark;type:text;comment:原因/备注" json:"remark,omitempty"`
ReasonTags StringSlice `gorm:"column:reason_tags;type:json;comment:结构化原因标签(JSON数组)" json:"reason_tags,omitempty"`
// createtime/updatetime/deletetime:秒级 Unix 时间戳(与 gorm 默认字段不同)
CreateTime *int64 `gorm:"column:createtime;comment:创建时间(秒)" json:"createtime,omitempty"`