12345678910111213141516171819202122232425262728 |
- package entity
- import (
- "time"
- )
- const TableNameRole = "roles"
- type Role struct {
- RoleID int64 `gorm:"column:role_id;type:int;primaryKey;autoIncrement:true" json:"role_id"`
- RoleName string `gorm:"column:role_name;type:varchar(100);not null" json:"role_name"`
- ModelIds string `gorm:"column:model_ids;type:text;not null" json:"model_ids"`
- RoleStatus int64 `gorm:"column:role_status;type:tinyint;not null;default:1" json:"role_status"`
- OperatorUID int64 `gorm:"column:operator_uid;type:bigint;not null" json:"operator_uid"`
- CreateAt time.Time `gorm:"column:create_at;type:timestamp;not null" json:"create_at"`
- UpdateAt time.Time `gorm:"column:update_at;type:timestamp;not null;default:CURRENT_TIMESTAMP" json:"update_at"`
- }
- func (*Role) TableName() string {
- return TableNameRole
- }
|