1234567891011121314151617181920212223242526272829 |
- // Code generated by gorm.io/gen. DO NOT EDIT.
- // Code generated by gorm.io/gen. DO NOT EDIT.
- // Code generated by gorm.io/gen. DO NOT EDIT.
- package model
- import (
- "time"
- )
- const TableNameAdminRole = "admin_role"
- // AdminRole mapped from table <admin_role>
- type AdminRole struct {
- ID int64 `gorm:"column:id;type:bigint(20);primaryKey;autoIncrement:true" json:"id"` // 角色ID
- Name string `gorm:"column:name;type:varchar(32);not null" json:"name"` // 角色名称
- Key string `gorm:"column:key;type:varchar(128);not null;uniqueIndex:key,priority:1" json:"key"` // 角色权限字符串
- Permissions string `gorm:"column:permissions;type:json" json:"permissions"` // 权限分配
- Remark string `gorm:"column:remark;type:varchar(255)" json:"remark"` // 备注
- Sort int32 `gorm:"column:sort;type:int(11);not null" json:"sort"` // 排序
- Status int32 `gorm:"column:status;type:int(11);not null;default:1" json:"status"` // 角色状态
- CreatedAt time.Time `gorm:"column:created_at;type:datetime" json:"created_at"` // 创建时间
- UpdatedAt time.Time `gorm:"column:updated_at;type:datetime" json:"updated_at"` // 更新时间
- }
- // TableName AdminRole's table name
- func (*AdminRole) TableName() string {
- return TableNameAdminRole
- }
|