role.go 1.2 KB

123456789101112131415161718192021222324
  1. package datamodel
  2. import "time"
  3. type Role struct {
  4. RoleId int64 `json:"roleId" xorm:"'role_id' pk comment('主键ID')"`
  5. RoleName string `json:"roleName" xorm:"'role_name' comment('角色名称')"`
  6. RoleDesc string `json:"roleDesc" xorm:"'role_desc' comment('描述')"`
  7. RoleTypeId int64 `json:"roleTypeId" xorm:"'role_type_id' comment('角色类型')"`
  8. SortNo int64 `json:"sortNo" xorm:"'sort_no' default 0 comment('排序')"`
  9. Status int64 `json:"status" xorm:"'status' default 0 comment('状态, 默认 0 正常,1 锁定')"`
  10. IsFixed int64 `json:"isFixed" xorm:"'is_fixed' comment('锁定,默认为0不锁定')"`
  11. CreatedBy int64 `json:"createdBy" xorm:"'created_by'"`
  12. CreatedAt time.Time `json:"createdAt" xorm:"'created_at'"`
  13. UpdatedBy int64 `json:"updatedBy" xorm:"'updated_by'"`
  14. UpdatedAt time.Time `json:"updatedAt" xorm:"'updated_at'"`
  15. DeletedFlag int64 `json:"deletedFlag" xorm:"'deleted_flag'"`
  16. DeletedBy int64 `json:"deletedBy" xorm:"'deleted_by'"`
  17. DeletedAt time.Time `json:"deletedAt" xorm:"'deleted_at'"`
  18. }
  19. func (m *Role) TableName() string {
  20. return "s_role"
  21. }