Documentation ¶
Index ¶
Constants ¶
View Source
const TableNameAPI = "api"
View Source
const TableNameCasbinRule = "casbin_rule"
View Source
const TableNameDepartment = "department"
View Source
const TableNameMenu = "menu"
View Source
const TableNameMenuAPI = "menu_apis"
View Source
const TableNameRole = "role"
View Source
const TableNameRoleMenu = "role_menus"
View Source
const TableNameUser = "user"
View Source
const TableNameUserRole = "user_role"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct { ID int64 `gorm:"column:id;type:bigint unsigned;primaryKey;autoIncrement:true" json:"id"` Name string `gorm:"column:name;type:varchar(50);not null" json:"name"` Path string `gorm:"column:path;type:varchar(50);not null;uniqueIndex:udx_name_path,priority:1" json:"path"` Method string `gorm:"column:method;type:varchar(50);not null;uniqueIndex:udx_name_path,priority:2" json:"method"` Description string `gorm:"column:description;type:varchar(50);not null" json:"description"` APIGroup string `gorm:"column:api_group;type:varchar(50);not null" json:"api_group"` CreatedAt string `gorm:"column:created_at;type:varchar(50);not null" json:"created_at"` UpdatedAt string `gorm:"column:updated_at;type:varchar(50);not null" json:"updated_at"` }
API mapped from table <api>
type CasbinRule ¶
type CasbinRule struct { ID int64 `gorm:"column:id;type:bigint unsigned;primaryKey;autoIncrement:true" json:"id"` Ptype *string `gorm:"column:ptype;type:varchar(100);uniqueIndex:idx_casbin_rule,priority:1" json:"ptype"` V0 *string `gorm:"column:v0;type:varchar(100);uniqueIndex:idx_casbin_rule,priority:2" json:"v0"` V1 *string `gorm:"column:v1;type:varchar(100);uniqueIndex:idx_casbin_rule,priority:3" json:"v1"` V2 *string `gorm:"column:v2;type:varchar(100);uniqueIndex:idx_casbin_rule,priority:4" json:"v2"` V3 *string `gorm:"column:v3;type:varchar(100);uniqueIndex:idx_casbin_rule,priority:5" json:"v3"` V4 *string `gorm:"column:v4;type:varchar(100);uniqueIndex:idx_casbin_rule,priority:6" json:"v4"` V5 *string `gorm:"column:v5;type:varchar(100);uniqueIndex:idx_casbin_rule,priority:7" json:"v5"` }
CasbinRule mapped from table <casbin_rule>
func (*CasbinRule) TableName ¶
func (*CasbinRule) TableName() string
TableName CasbinRule's table name
type Department ¶
type Department struct { ID int64 `gorm:"column:id;type:bigint unsigned;primaryKey;autoIncrement:true" json:"id"` Name *string `gorm:"column:name;type:varchar(191)" json:"name"` Status *int64 `gorm:"column:status;type:bigint" json:"status"` Sort *int64 `gorm:"column:sort;type:bigint" json:"sort"` Principal *string `gorm:"column:principal;type:varchar(191)" json:"principal"` ParentID *int64 `gorm:"column:parent_id;type:bigint unsigned;index:fk_department_departments,priority:1" json:"parent_id"` Phone *string `gorm:"column:phone;type:varchar(191)" json:"phone"` Email *string `gorm:"column:email;type:varchar(191)" json:"email"` CreatedAt *time.Time `gorm:"column:created_at;type:datetime(3)" json:"created_at"` UpdatedAt *time.Time `gorm:"column:updated_at;type:datetime(3)" json:"updated_at"` DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3);index:idx_department_deleted_at,priority:1" json:"deleted_at"` }
Department mapped from table <department>
func (*Department) TableName ¶
func (*Department) TableName() string
TableName Department's table name
type Menu ¶
type Menu struct { ID int64 `gorm:"column:id;type:bigint unsigned;primaryKey;autoIncrement:true" json:"id"` Name *string `gorm:"column:name;type:varchar(191)" json:"name"` Path *string `gorm:"column:path;type:varchar(191)" json:"path"` Component *string `gorm:"column:component;type:varchar(191)" json:"component"` Redirect *string `gorm:"column:redirect;type:varchar(191)" json:"redirect"` Layout *int64 `gorm:"column:layout;type:bigint" json:"layout"` Icon *string `gorm:"column:icon;type:varchar(191)" json:"icon"` Type *int64 `gorm:"column:type;type:bigint" json:"type"` Remark *string `gorm:"column:remark;type:longtext" json:"remark"` RequestURL *string `gorm:"column:request_url;type:longtext" json:"request_url"` RequestMethod *string `gorm:"column:request_method;type:longtext" json:"request_method"` Link *string `gorm:"column:link;type:longtext" json:"link"` Identifier *int64 `gorm:"column:identifier;type:bigint" json:"identifier"` Sort *int64 `gorm:"column:sort;type:bigint" json:"sort"` Hidden *int64 `gorm:"column:hidden;type:bigint" json:"hidden"` Cache *int64 `gorm:"column:cache;type:bigint" json:"cache"` Fixed *int64 `gorm:"column:fixed;type:bigint" json:"fixed"` Pid *int64 `gorm:"column:pid;type:bigint unsigned;index:fk_menu_children,priority:1" json:"pid"` CreatedAt *time.Time `gorm:"column:created_at;type:datetime(3)" json:"created_at"` UpdatedAt *time.Time `gorm:"column:updated_at;type:datetime(3)" json:"updated_at"` DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3);index:idx_menu_deleted_at,priority:1" json:"deleted_at"` }
Menu mapped from table <menu>
type MenuAPI ¶
type MenuAPI struct { MenuID int64 `gorm:"column:menu_id;type:bigint unsigned;primaryKey" json:"menu_id"` APIID int64 `gorm:"column:api_id;type:bigint unsigned;primaryKey;index:fk_menu_apis_api,priority:1" json:"api_id"` }
MenuAPI mapped from table <menu_apis>
type Role ¶
type Role struct { ID int64 `gorm:"column:id;type:bigint unsigned;primaryKey;autoIncrement:true" json:"id"` Name *string `gorm:"column:name;type:longtext" json:"name"` Order *int64 `gorm:"column:order;type:bigint" json:"order"` Mark *string `gorm:"column:mark;type:longtext" json:"mark"` Status *int64 `gorm:"column:status;type:bigint" json:"status"` CreatedAt *time.Time `gorm:"column:created_at;type:datetime(3)" json:"created_at"` UpdatedAt *time.Time `gorm:"column:updated_at;type:datetime(3)" json:"updated_at"` DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3);index:idx_role_deleted_at,priority:1" json:"deleted_at"` }
Role mapped from table <role>
type RoleMenu ¶
type RoleMenu struct { RoleID int64 `gorm:"column:role_id;type:bigint unsigned;primaryKey" json:"role_id"` MenuID int64 `gorm:"column:menu_id;type:bigint unsigned;primaryKey;index:fk_role_menus_menu,priority:1" json:"menu_id"` }
RoleMenu mapped from table <role_menus>
type User ¶
type User struct { ID int64 `gorm:"column:id;type:bigint unsigned;primaryKey;autoIncrement:true" json:"id"` Name *string `gorm:"column:name;type:longtext" json:"name"` Phone *string `gorm:"column:phone;type:longtext" json:"phone"` Status *int64 `gorm:"column:status;type:bigint" json:"status"` Account *string `gorm:"column:account;type:longtext" json:"account"` Password *string `gorm:"column:password;type:longtext" json:"password"` DepartmentID *int64 `gorm:"column:department_id;type:bigint unsigned" json:"department_id"` RoleID *int64 `gorm:"column:role_id;type:bigint unsigned" json:"role_id"` Sex *int64 `gorm:"column:sex;type:bigint" json:"sex"` Posts *string `gorm:"column:posts;type:longtext" json:"posts"` Avatar *string `gorm:"column:avatar;type:longtext" json:"avatar"` Email *string `gorm:"column:email;type:longtext" json:"email"` CreatedAt *time.Time `gorm:"column:created_at;type:datetime(3)" json:"created_at"` UpdatedAt *time.Time `gorm:"column:updated_at;type:datetime(3)" json:"updated_at"` DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3);index:idx_user_deleted_at,priority:1" json:"deleted_at"` }
User mapped from table <user>
Click to show internal directories.
Click to hide internal directories.