Files
servicebase/pkg/model/admin_privilege.gen.go
2025-11-18 17:48:20 +08:00

39 lines
3.0 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 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"
"gorm.io/gorm"
)
const TableNameAdminPrivilege = "admin_privilege"
// AdminPrivilege 租户-权限表
type AdminPrivilege struct {
ID string `gorm:"column:id;type:char(32);not null;uniqueIndex:id,priority:1;comment:业务ID" json:"id"` // 业务ID
TenantID string `gorm:"column:tenant_id;type:char(32);not null;default:system;comment:企业ID" json:"tenant_id"` // 企业ID
ScopeID string `gorm:"column:scope_id;type:char(32);not null;comment:范围" json:"scope_id"` // 范围
ParentID string `gorm:"column:parent_id;type:char(32);not null;comment:父ID" json:"parent_id"` // 父ID
Code string `gorm:"column:code;type:varchar(64);not null;comment:代码" json:"code"` // 代码
Name string `gorm:"column:name;type:varchar(64);not null;index:idx_name,priority:1;comment:权限名称" json:"name"` // 权限名称
Level int32 `gorm:"column:level;type:int;not null;comment:权限级别" json:"level"` // 权限级别
SourceType string `gorm:"column:source_type;type:varchar(64);not null;comment:类型resource、interface等" json:"source_type"` // 类型resource、interface等
TargetType string `gorm:"column:target_type;type:varchar(255);not null" json:"target_type"`
Target string `gorm:"column:target;type:varchar(255);not null;comment:权限值 resource:菜单路径; api=url-pre" json:"target"` // 权限值 resource:菜单路径; api=url-pre
Desc string `gorm:"column:desc;type:varchar(64);not null;comment:描述" json:"desc"` // 描述
DeleteAt *gorm.DeletedAt `gorm:"column:delete_at;type:datetime;index:idx_delete_at,priority:1;comment:del标志" json:"delete_at"` // del标志
CreateAt time.Time `gorm:"column:create_at;type:datetime;not null;default:CURRENT_TIMESTAMP;comment:创建时间" json:"create_at"` // 创建时间
CreateBy string `gorm:"column:create_by;type:varchar(255);not null;comment:创建人" json:"create_by"` // 创建人
UpdateAt time.Time `gorm:"column:update_at;type:datetime;not null;index:idx_delete_at,priority:2;default:CURRENT_TIMESTAMP;comment:更新时间" json:"update_at"` // 更新时间
UpdateBy string `gorm:"column:update_by;type:varchar(255);not null;comment:更新人" json:"update_by"` // 更新人
}
// TableName AdminPrivilege's table name
func (*AdminPrivilege) TableName() string {
return TableNameAdminPrivilege
}