package entities import ( "gorm.io/gorm" "sorbet/pkg/db" "time" ) // SystemUser 系统用户表 type SystemUser struct { ID int64 `json:"id" xml:"id" gorm:"primaryKey;not null;comment:系统用户编号"` Username string `json:"username" xml:"username" gorm:"size:25;not null;uniqueIndex;comment:用户名"` Password string `json:"-" xml:"-" gorm:"size:250;not null;comment:登录密码"` Status bool `json:"status" xml:"status" gorm:"comment:状态"` Version db.Version `json:"-" xml:"-" gorm:"comment:乐观锁"` CreatedAt time.Time `json:"create_time" xml:"create_time" gorm:"<-:false;comment:创建时间"` UpdatedAt time.Time `json:"update_time" xml:"update_time" gorm:"<-:false;comment:更新时间"` DeletedAt gorm.DeletedAt `json:"-" xml:"-" gorm:"comment:删除时间"` Roles []*SystemRole `json:"roles" xml:"roles" gorm:"many2many:system_user_to_role_relations"` }