feat:完善项目
This commit is contained in:
@ -3,7 +3,10 @@ package common
|
||||
import (
|
||||
"ArmedPolice/app/common/model"
|
||||
"ArmedPolice/config"
|
||||
"ArmedPolice/lib"
|
||||
"ArmedPolice/serve/orm"
|
||||
"ArmedPolice/utils"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type synchronized struct {
|
||||
@ -36,13 +39,22 @@ func initModel() {
|
||||
}
|
||||
function(
|
||||
&synchronized{iModel: model.NewSysTenant()},
|
||||
&synchronized{iModel: model.NewSysConfig()},
|
||||
&synchronized{iModel: model.NewSysConfig(), iValues: func() interface{} {
|
||||
values := make([]*model.SysConfig, 0)
|
||||
lib.LoadConfig("./json/sys_config.json", &values)
|
||||
fmt.Println(utils.AnyToJSON(values))
|
||||
return values
|
||||
}},
|
||||
&synchronized{iModel: model.NewSysMenu()}, &synchronized{iModel: model.NewSysAuth()},
|
||||
&synchronized{iModel: model.NewSysUser(), iValues: func() interface{} {
|
||||
return &model.SysUser{Account: "admin", Name: "超级管理员", Mobile: "13888888888", Password: "123456",
|
||||
IsAdmin: model.SysUserAdministratorForAdmin, Remark: "超级管理员"}
|
||||
}},
|
||||
&synchronized{iModel: model.NewSysRole()}, &synchronized{iModel: model.NewSysRoleMenu()}, &synchronized{iModel: model.NewSysRoleAuth()},
|
||||
&synchronized{iModel: model.NewSysRole(), iValues: func() interface{} {
|
||||
values := make([]*model.SysRole, 0)
|
||||
lib.LoadConfig("./json/sys_role.json", &values)
|
||||
return values
|
||||
}}, &synchronized{iModel: model.NewSysRoleMenu()}, &synchronized{iModel: model.NewSysRoleAuth()},
|
||||
&synchronized{iModel: model.NewSysUserRole()},
|
||||
// 日志管理
|
||||
&synchronized{iModel: model.NewSysLog()}, &synchronized{iModel: model.NewSysUserLoginLog()},
|
||||
@ -55,7 +67,11 @@ func initModel() {
|
||||
&synchronized{iModel: model.NewManageMaterial()}, &synchronized{iModel: model.NewManageMaterialSupplier()},
|
||||
&synchronized{iModel: model.NewManageMaterialPurchase()}, &synchronized{iModel: model.NewManageMaterialWarehouse()},
|
||||
&synchronized{iModel: model.NewWorkInstance()}, &synchronized{iModel: model.NewWorkMaterial()}, &synchronized{iModel: model.NewWorkProgress()},
|
||||
&synchronized{iModel: model.NewWorkSchedule()}, &synchronized{iModel: model.NewWorkPurchase()},
|
||||
&synchronized{iModel: model.NewWorkSchedule(), iValues: func() interface{} {
|
||||
values := make([]*model.WorkSchedule, 0)
|
||||
lib.LoadConfig("./json/work_schedule.json", &values)
|
||||
return values
|
||||
}}, &synchronized{iModel: model.NewWorkPurchase()},
|
||||
&synchronized{iModel: model.NewWorkRepair()}, &synchronized{iModel: model.NewWorkRepairDetail()},
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user