role.gen.go 1.9 KB

12345678910111213141516171819202122232425262728293031
  1. // Code generated by gorm.io/gen. DO NOT EDIT.
  2. // Code generated by gorm.io/gen. DO NOT EDIT.
  3. // Code generated by gorm.io/gen. DO NOT EDIT.
  4. package model
  5. import (
  6. "time"
  7. )
  8. const TableNameRole = "role"
  9. // Role mapped from table <role>
  10. type Role struct {
  11. ID int64 `gorm:"column:id;type:bigint(20);primaryKey;autoIncrement:true" json:"id"` // 角色ID
  12. Name string `gorm:"column:name;type:varchar(32);not null" json:"name"` // 角色名称
  13. Key string `gorm:"column:key;type:varchar(128);not null" json:"key"` // 角色权限字符串
  14. DataScope bool `gorm:"column:data_scope;type:tinyint(1);default:1" json:"data_scope"` // 数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)
  15. MenuCheckStrictly bool `gorm:"column:menu_check_strictly;type:tinyint(1);default:1" json:"menu_check_strictly"` // 菜单树选择项是否关联显示
  16. DeptCheckStrictly bool `gorm:"column:dept_check_strictly;type:tinyint(1);default:1" json:"dept_check_strictly"` // 部门树选择项是否关联显示
  17. Remark string `gorm:"column:remark;type:varchar(255)" json:"remark"` // 备注
  18. Sort int32 `gorm:"column:sort;type:int(11);not null" json:"sort"` // 排序
  19. Status string `gorm:"column:status;type:char(1);not null;default:1" json:"status"` // 角色状态
  20. CreatedAt time.Time `gorm:"column:created_at;type:datetime" json:"created_at"` // 创建时间
  21. UpdatedAt time.Time `gorm:"column:updated_at;type:datetime" json:"updated_at"` // 更新时间
  22. }
  23. // TableName Role's table name
  24. func (*Role) TableName() string {
  25. return TableNameRole
  26. }