feat:完善项目信息
This commit is contained in:
@ -48,8 +48,8 @@ func mysql() *gorm.DB {
|
||||
orm.WithMaxOpenConns(2000),
|
||||
orm.WithMaxLifetime(1000),
|
||||
orm.WithMysqlOption(&logic.Mysql{
|
||||
User: "appuser", Password: "ABCabc01!", Host: "192.168.0.188", Port: 3306,
|
||||
DBName: "sciences", Parameters: "charset=utf8mb4,utf8&parseTime=True&loc=Local",
|
||||
Username: "appuser", Password: "ABCabc01!", Host: "192.168.0.188", Port: 3306,
|
||||
Database: "sciences", Parameters: "charset=utf8mb4,utf8&parseTime=True&loc=Local",
|
||||
}),
|
||||
).Init()
|
||||
return instance.Engine
|
||||
|
@ -6,7 +6,7 @@ type SysDepartment struct {
|
||||
ModelTenant
|
||||
ParentID uint64 `gorm:"column:parent_id;type:int;default:0;comment:父级ID" json:"-"`
|
||||
Name string `gorm:"column:name;type:varchar(20);default:'';comment:部门名称" json:"name"`
|
||||
Contact string `gorm:"column:contact_name;type:varchar(20);default:'';comment:联系人" json:"contact_name"`
|
||||
Contact string `gorm:"column:contact;type:varchar(20);default:'';comment:联系人" json:"contact"`
|
||||
ContactMobile string `gorm:"column:contact_mobile;type:varchar(15);default:'';comment:联系方式" json:"contact_mobile"`
|
||||
Status int `gorm:"column:status;type:tinyint(1);default:1;comment:状态(1:正常,2:禁用)" json:"status"`
|
||||
Remark string `gorm:"column:remark;type:varchar(255);default:'';comment:备注信息" json:"remark"`
|
||||
|
@ -3,7 +3,7 @@ package model
|
||||
type SysMenu struct {
|
||||
Model
|
||||
SysMenuBasic
|
||||
Auth SysMenuAuth `gorm:"column:auth;type:tinyint(1);default:0;comment:查看权限(0:通用,1:超管)" json:"-"`
|
||||
Auth string `gorm:"column:auth;type:varchar(100);default:'';comment:权限/路由" json:"auth"`
|
||||
Sort int `gorm:"column:sort;type:tinyint(3);default:0;comment:排序,数值越大,优先排序" json:"sort"`
|
||||
Remark string `gorm:"column:remark;type:varchar(255);default:'';comment:菜单备注" json:"remark"`
|
||||
Status SysMenuStatus `gorm:"column:status;type:tinyint(1);default:1;comment:状态" json:"status"`
|
||||
@ -34,16 +34,6 @@ const (
|
||||
SysMenuKindForEvent
|
||||
)
|
||||
|
||||
// SysMenuAuth 菜单权限
|
||||
type SysMenuAuth int
|
||||
|
||||
const (
|
||||
// SysMenuAuthForOrdinary 普通权限
|
||||
SysMenuAuthForOrdinary SysMenuAuth = iota
|
||||
// SysMenuAuthForSystem 系统权限
|
||||
SysMenuAuthForSystem
|
||||
)
|
||||
|
||||
// SysMenuStatus 菜单状态
|
||||
type SysMenuStatus int
|
||||
|
||||
|
@ -2,7 +2,6 @@ package model
|
||||
|
||||
type SysRoleMenu struct {
|
||||
Model
|
||||
ModelTenant
|
||||
RoleID uint64 `gorm:"column:role_id;type:int;default:0;comment:角色ID" json:"-"`
|
||||
MenuID uint64 `gorm:"column:menu_id;type:int;default:0;comment:菜单ID" json:"-"`
|
||||
ModelDeleted
|
||||
|
Reference in New Issue
Block a user