roles.go 1.3 KB

12345678910111213141516171819202122232425262728
  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 entity
  5. import (
  6. "time"
  7. )
  8. const TableNameRole = "roles"
  9. // Role mapped from table <roles>
  10. type Role struct {
  11. RoleID int64 `gorm:"column:role_id;type:int;primaryKey;autoIncrement:true" json:"role_id"` // 权限ID
  12. RoleName string `gorm:"column:role_name;type:varchar(100);not null" json:"role_name"` // 权限名称
  13. ModelIds string `gorm:"column:model_ids;type:text;not null" json:"model_ids"` // 权限对应的模块名
  14. RoleStatus int64 `gorm:"column:role_status;type:tinyint;not null;default:1" json:"role_status"` // 模块状态
  15. OperatorUID int64 `gorm:"column:operator_uid;type:bigint;not null" json:"operator_uid"` // 操作人
  16. CreateAt time.Time `gorm:"column:create_at;type:timestamp;not null" json:"create_at"` // 添加时间
  17. UpdateAt time.Time `gorm:"column:update_at;type:timestamp;not null;default:CURRENT_TIMESTAMP" json:"update_at"` // 更新时间
  18. }
  19. // TableName Role's table name
  20. func (*Role) TableName() string {
  21. return TableNameRole
  22. }