package model import ( "time" "gorm.io/gorm" ) // SupervisorBinding 表示监督关系(一对:owner -> supervisor)。 type SupervisorBinding struct { ID uint `gorm:"primaryKey;comment:主键" json:"id"` CreatedAt time.Time `gorm:"comment:创建时间" json:"created_at"` UpdatedAt time.Time `gorm:"comment:更新时间" json:"updated_at"` DeletedAt gorm.DeletedAt `gorm:"index;comment:删除时间" json:"-"` OwnerUID int `gorm:"column:owner_uid;uniqueIndex:uniq_owner_supervisor;index;comment:被监督用户ID" json:"owner_uid"` SupervisorUID int `gorm:"column:supervisor_uid;uniqueIndex:uniq_owner_supervisor;index;comment:监督人用户ID" json:"supervisor_uid"` Status string `gorm:"column:status;size:16;index;comment:状态(active|revoked)" json:"status"` } func (SupervisorBinding) TableName() string { return "fa_quit_checkin_supervisor_binding" } func (SupervisorBinding) TableComment() string { return "V2-无烟打卡-监督关系" }