package sys import ( "dy-admin/internal/pcmserver/common" "dy-admin/internal/pcmserver/global" "dy-admin/internal/pcmserver/sys/model" "gorm.io/gorm/clause" "time" ) var APIInitEntities = []model.Api{ // base 1: {Model: common.Model{ID: 1}, Path: "/base/login", Action: "POST", Type: "SYS", Description: "登录", ApiGroup: "base", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, // api 10: {Model: common.Model{ID: 10}, Path: "/sys/v1/api", Action: "POST", Type: "SYS", Description: "创建API", ApiGroup: "api", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 11: {Model: common.Model{ID: 11}, Path: "/sys/v1/api", Action: "DELETE", Type: "SYS", Description: "删除API", ApiGroup: "api", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 12: {Model: common.Model{ID: 12}, Path: "/sys/v1/api/list", Action: "GET", Type: "SYS", Description: "分页获取API", ApiGroup: "api", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 13: {Model: common.Model{ID: 13}, Path: "/sys/v1/api/one", Action: "GET", Type: "SYS", Description: "获取单条API", ApiGroup: "api", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 14: {Model: common.Model{ID: 14}, Path: "/sys/v1/api", Action: "PUT", Type: "SYS", Description: "修改API", ApiGroup: "api", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 15: {Model: common.Model{ID: 15}, Path: "/sys/v1/api/ids", Action: "DELETE", Type: "SYS", Description: "批量删除API", ApiGroup: "api", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, // dept 20: {Model: common.Model{ID: 20}, Path: "/sys/v1/dept", Action: "POST", Type: "SYS", Description: "创建部门", ApiGroup: "部门", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 21: {Model: common.Model{ID: 21}, Path: "/sys/v1/dept", Action: "PUT", Type: "SYS", Description: "更新部门", ApiGroup: "部门", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 22: {Model: common.Model{ID: 22}, Path: "/sys/v1/dept", Action: "DELETE", Type: "SYS", Description: "删除部门", ApiGroup: "部门", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 23: {Model: common.Model{ID: 23}, Path: "/sys/v1/dept/tree", Action: "GET", Type: "SYS", Description: "获取部门树", ApiGroup: "部门", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 24: {Model: common.Model{ID: 24}, Path: "/sys/v1/dept/one", Action: "GET", Type: "SYS", Description: "获取单个部门", ApiGroup: "部门", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, // 菜单 30: {Model: common.Model{ID: 30}, Path: "/sys/v1/menu", Action: "POST", Type: "SYS", Description: "创建菜单", ApiGroup: "菜单", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 31: {Model: common.Model{ID: 31}, Path: "/sys/v1/menu", Action: "PUT", Type: "SYS", Description: "修改菜单", ApiGroup: "菜单", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 32: {Model: common.Model{ID: 32}, Path: "/sys/v1/menu", Action: "DELETE", Type: "SYS", Description: "删除菜单", ApiGroup: "菜单", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 33: {Model: common.Model{ID: 33}, Path: "/sys/v1/menu/one", Action: "GET", Type: "SYS", Description: "获取菜单", ApiGroup: "菜单", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 34: {Model: common.Model{ID: 34}, Path: "/sys/v1/menu/tree", Action: "GET", Type: "SYS", Description: "获取菜单树", ApiGroup: "菜单", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, // 角色 40: {Model: common.Model{ID: 40}, Path: "/sys/v1/role", Action: "POST", Type: "SYS", Description: "创建角色", ApiGroup: "角色", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 41: {Model: common.Model{ID: 41}, Path: "/sys/v1/role", Action: "PUT", Type: "SYS", Description: "更新角色", ApiGroup: "角色", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 42: {Model: common.Model{ID: 42}, Path: "/sys/v1/role", Action: "DELETE", Type: "SYS", Description: "删除角色", ApiGroup: "角色", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 43: {Model: common.Model{ID: 43}, Path: "/sys/v1/role/list", Action: "GET", Type: "SYS", Description: "分页获取角色", ApiGroup: "角色", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 44: {Model: common.Model{ID: 44}, Path: "/sys/v1/role/one", Action: "GET", Type: "SYS", Description: "获取单条角色", ApiGroup: "角色", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 45: {Model: common.Model{ID: 45}, Path: "/sys/v1/role/deptIds", Action: "GET", Type: "SYS", Description: "获取角色部门ids", ApiGroup: "角色", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 46: {Model: common.Model{ID: 46}, Path: "/sys/v1/role/menuIds", Action: "GET", Type: "SYS", Description: "获取角色菜单ids", ApiGroup: "角色", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 47: {Model: common.Model{ID: 47}, Path: "/sys/v1/role/dataScope", Action: "PUT", Type: "SYS", Description: "修改角色数据权限", ApiGroup: "角色", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, // 用户 50: {Model: common.Model{ID: 50}, Path: "/sys/v1/user/register", Action: "POST", Type: "SYS", Description: "注册系统用户", ApiGroup: "用户", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 51: {Model: common.Model{ID: 51}, Path: "/sys/v1/user/resetPassword", Action: "PUT", Type: "SYS", Description: "重置密码", ApiGroup: "用户", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 52: {Model: common.Model{ID: 52}, Path: "/sys/v1/user/changePassword", Action: "PUT", Type: "SYS", Description: "更改密码", ApiGroup: "用户", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 53: {Model: common.Model{ID: 53}, Path: "/sys/v1/user/list", Action: "GET", Type: "SYS", Description: "获取用户列表", ApiGroup: "用户", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 54: {Model: common.Model{ID: 54}, Path: "/sys/v1/user", Action: "DELETE", Type: "SYS", Description: "删除用户", ApiGroup: "用户", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 55: {Model: common.Model{ID: 55}, Path: "/sys/v1/user/setUserInfo", Action: "PUT", Type: "SYS", Description: "修改用户信息", ApiGroup: "用户", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 56: {Model: common.Model{ID: 56}, Path: "/sys/v1/user/getUserInfo", Action: "GET", Type: "SYS", Description: "获取用户详情", ApiGroup: "用户", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, // 操作记录 60: {Model: common.Model{ID: 60}, Path: "/sys/v1/operation", Action: "DELETE", Type: "SYS", Description: "删除操作记录", ApiGroup: "操作记录", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 61: {Model: common.Model{ID: 61}, Path: "/sys/v1/operation", Action: "GET", Type: "SYS", Description: "获取单条操作记录", ApiGroup: "操作记录", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 62: {Model: common.Model{ID: 62}, Path: "/sys/v1/operation/list", Action: "GET", Type: "SYS", Description: "分页获取操作记录", ApiGroup: "操作记录", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 63: {Model: common.Model{ID: 63}, Path: "/sys/v1/operation/ids", Action: "DELETE", Type: "SYS", Description: "批量删除操作记录", ApiGroup: "操作记录", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, // 登录记录 70: {Model: common.Model{ID: 70}, Path: "/sys/v1/loginRecord/ids", Action: "DELETE", Type: "SYS", Description: "批量删除登录记录", ApiGroup: "登录记录", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 71: {Model: common.Model{ID: 71}, Path: "/sys/v1/loginRecord", Action: "GET", Type: "SYS", Description: "获取单条登录记录", ApiGroup: "登录记录", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 72: {Model: common.Model{ID: 72}, Path: "/sys/v1/loginRecord/list", Action: "GET", Type: "SYS", Description: "分页获取登录记录", ApiGroup: "登录记录", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, // 业务api // 柜子 1000: {Model: common.Model{ID: 1000}, Path: "/bus/v1/cabinet", Action: "POST", Type: "BUS", Description: "创建手机柜", ApiGroup: "手机柜", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1001: {Model: common.Model{ID: 1001}, Path: "/bus/v1/cabinet", Action: "PUT", Type: "BUS", Description: "修改手机柜", ApiGroup: "手机柜", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1002: {Model: common.Model{ID: 1002}, Path: "/bus/v1/cabinet", Action: "GET", Type: "BUS", Description: "获取手机柜", ApiGroup: "手机柜", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1003: {Model: common.Model{ID: 1003}, Path: "/bus/v1/cabinet", Action: "DELETE", Type: "BUS", Description: "删除手机柜", ApiGroup: "手机柜", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1004: {Model: common.Model{ID: 1004}, Path: "/bus/v1/cabinet/list", Action: "GET", Type: "BUS", Description: "分页获取手机柜", ApiGroup: "手机柜", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1005: {Model: common.Model{ID: 1005}, Path: "/bus/v1/cabinet/status", Action: "PUT", Type: "BUS", Description: "更新手机柜是否允许开", ApiGroup: "手机柜", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, // 柜子时间 1010: {Model: common.Model{ID: 1010}, Path: "/bus/v1/cabinetTime", Action: "POST", Type: "BUS", Description: "创建时间规则", ApiGroup: "柜子时间", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1011: {Model: common.Model{ID: 1011}, Path: "/bus/v1/cabinetTime", Action: "PUT", Type: "BUS", Description: "修改时间规则", ApiGroup: "柜子时间", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1012: {Model: common.Model{ID: 1012}, Path: "/bus/v1/cabinetTime", Action: "GET", Type: "BUS", Description: "获取时间规则", ApiGroup: "柜子时间", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1013: {Model: common.Model{ID: 1013}, Path: "/bus/v1/cabinetTime", Action: "DELETE", Type: "BUS", Description: "删除时间规则", ApiGroup: "柜子时间", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, // 格子 1020: {Model: common.Model{ID: 1020}, Path: "/bus/v1/grid/open", Action: "POST", Type: "BUS", Description: "开启格子", ApiGroup: "格子", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1021: {Model: common.Model{ID: 1021}, Path: "/bus/v1/grid/list", Action: "GET", Type: "BUS", Description: "格子列表", ApiGroup: "格子", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, // 请假 1030: {Model: common.Model{ID: 1030}, Path: "/bus/v1/leave", Action: "POST", Type: "BUS", Description: "创建请假", ApiGroup: "请假", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1031: {Model: common.Model{ID: 1031}, Path: "/bus/v1/leave", Action: "PUT", Type: "BUS", Description: "更新请假", ApiGroup: "请假", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1032: {Model: common.Model{ID: 1032}, Path: "/bus/v1/leave", Action: "GET", Type: "BUS", Description: "获取请假", ApiGroup: "请假", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1033: {Model: common.Model{ID: 1033}, Path: "/bus/v1/leave", Action: "DELETE", Type: "BUS", Description: "删除请假", ApiGroup: "请假", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1034: {Model: common.Model{ID: 1034}, Path: "/bus/v1/leave/list", Action: "GET", Type: "BUS", Description: "分页获取请假", ApiGroup: "请假", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, // 人员 1040: {Model: common.Model{ID: 1040}, Path: "/bus/v1/staff", Action: "POST", Type: "BUS", Description: "创建人员", ApiGroup: "人员", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1041: {Model: common.Model{ID: 1041}, Path: "/bus/v1/staff", Action: "PUT", Type: "BUS", Description: "更新人员", ApiGroup: "人员", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1042: {Model: common.Model{ID: 1042}, Path: "/bus/v1/staff", Action: "GET", Type: "BUS", Description: "获取人员", ApiGroup: "人员", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1043: {Model: common.Model{ID: 1043}, Path: "/bus/v1/staff", Action: "DELETE", Type: "BUS", Description: "删除人员", ApiGroup: "人员", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1044: {Model: common.Model{ID: 1044}, Path: "/bus/v1/staff/list", Action: "GET", Type: "BUS", Description: "分页获取人员", ApiGroup: "人员", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, // 工作时间 1050: {Model: common.Model{ID: 1050}, Path: "/bus/v1/workTime", Action: "POST", Type: "BUS", Description: "创建工作时间", ApiGroup: "工作时间", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1051: {Model: common.Model{ID: 1051}, Path: "/bus/v1/workTime", Action: "PUT", Type: "BUS", Description: "更新工作时间", ApiGroup: "工作时间", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1052: {Model: common.Model{ID: 1052}, Path: "/bus/v1/workTime/status", Action: "PUT", Type: "BUS", Description: "切换状态", ApiGroup: "工作时间", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1053: {Model: common.Model{ID: 1053}, Path: "/bus/v1/workTime", Action: "DELETE", Type: "BUS", Description: "删除工作时间", ApiGroup: "工作时间", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1054: {Model: common.Model{ID: 1054}, Path: "/bus/v1/workTime", Action: "GET", Type: "BUS", Description: "分页获取工作时间", ApiGroup: "工作时间", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, // 例外时间 1060: {Model: common.Model{ID: 1060}, Path: "/bus/v1/specTime", Action: "POST", Type: "BUS", Description: "创建例外时间", ApiGroup: "例外时间", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1061: {Model: common.Model{ID: 1061}, Path: "/bus/v1/specTime", Action: "PUT", Type: "BUS", Description: "更新例外时间", ApiGroup: "例外时间", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1062: {Model: common.Model{ID: 1062}, Path: "/bus/v1/specTime/status", Action: "PUT", Type: "BUS", Description: "切换状态", ApiGroup: "例外时间", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1063: {Model: common.Model{ID: 1063}, Path: "/bus/v1/specTime", Action: "DELETE", Type: "BUS", Description: "删除例外时间", ApiGroup: "例外时间", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1064: {Model: common.Model{ID: 1064}, Path: "/bus/v1/specTime", Action: "GET", Type: "BUS", Description: "分页获取例外时间", ApiGroup: "例外时间", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, // 开关门记录 1070: {Model: common.Model{ID: 1070}, Path: "/bus/v1/open", Action: "POST", Type: "BUS", Description: "创建开关门记录(测试使用)", ApiGroup: "开关门记录", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1071: {Model: common.Model{ID: 1071}, Path: "/bus/v1/open", Action: "DELETE", Type: "BUS", Description: "删除记录", ApiGroup: "开关门记录", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1072: {Model: common.Model{ID: 1072}, Path: "/bus/v1/open/list", Action: "GET", Type: "BUS", Description: "分页获取记录", ApiGroup: "开关门记录", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1073: {Model: common.Model{ID: 1073}, Path: "/bus/v1/open/statistics", Action: "GET", Type: "BUS", Description: "开关门统计", ApiGroup: "开关门记录", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, // 存物日志 1080: {Model: common.Model{ID: 1080}, Path: "/bus/v1/store", Action: "POST", Type: "BUS", Description: "创建存取记录(测试使用)", ApiGroup: "存取记录", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1081: {Model: common.Model{ID: 1081}, Path: "/bus/v1/store", Action: "DELETE", Type: "BUS", Description: "删除记录", ApiGroup: "存取记录", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1082: {Model: common.Model{ID: 1082}, Path: "/bus/v1/store/list", Action: "GET", Type: "BUS", Description: "分页获取记录", ApiGroup: "存取记录", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1083: {Model: common.Model{ID: 1083}, Path: "/bus/v1/store/statistics", Action: "GET", Type: "BUS", Description: "存物统计", ApiGroup: "存取记录", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, // 警告日志 1090: {Model: common.Model{ID: 1090}, Path: "/bus/v1/warn", Action: "POST", Type: "BUS", Description: "创建警告记录(测试使用)", ApiGroup: "警告记录", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1091: {Model: common.Model{ID: 1091}, Path: "/bus/v1/warn", Action: "DELETE", Type: "BUS", Description: "删除记录", ApiGroup: "警告记录", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1092: {Model: common.Model{ID: 1092}, Path: "/bus/v1/warn/list", Action: "GET", Type: "BUS", Description: "分页获取记录", ApiGroup: "警告记录", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1093: {Model: common.Model{ID: 1093}, Path: "/bus/v1/warn/statistics", Action: "GET", Type: "BUS", Description: "告警统计", ApiGroup: "警告记录", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, //内存接口 1100: {Model: common.Model{ID: 1100}, Path: "/bus/v1/mem/cabinets", Action: "GET", Type: "BUS", Description: "内存柜子信息", ApiGroup: "内存信息", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1101: {Model: common.Model{ID: 1101}, Path: "/bus/v1/mem/jobs", Action: "GET", Type: "BUS", Description: "内存定时任务", ApiGroup: "内存信息", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1102: {Model: common.Model{ID: 1102}, Path: "/bus/v1/mem/config", Action: "GET", Type: "BUS", Description: "内存配置信息", ApiGroup: "内存信息", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, //ws接口 1200: {Model: common.Model{ID: 1200}, Path: "/bus/v1/homePage", Action: "GET", Type: "BUS", Description: "首页ws连接", ApiGroup: "WS", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, // 设备接口 1300: {Model: common.Model{ID: 1300}, Path: "/bus/v1/device", Action: "POST", Type: "BUS", Description: "创建设备日志(测试使用)", ApiGroup: "设备日志", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1301: {Model: common.Model{ID: 1301}, Path: "/bus/v1/device", Action: "DELETE", Type: "BUS", Description: "删除设备日志", ApiGroup: "设备日志", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1302: {Model: common.Model{ID: 1302}, Path: "/bus/v1/device/list", Action: "GET", Type: "BUS", Description: "设备日志列表", ApiGroup: "设备日志", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1401: {Model: common.Model{ID: 1401}, Path: "/bus/v1/cron", Action: "DELETE", Type: "BUS", Description: "删除定时任务日志", ApiGroup: "定时任务日志", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1402: {Model: common.Model{ID: 1402}, Path: "/bus/v1/cron/list", Action: "GET", Type: "BUS", Description: "定时任务日志列表", ApiGroup: "定时任务日志", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1501: {Model: common.Model{ID: 1501}, Path: "/bus/v1/connect", Action: "DELETE", Type: "BUS", Description: "删除连接日志", ApiGroup: "连接日志", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1502: {Model: common.Model{ID: 1502}, Path: "/bus/v1/connect/list", Action: "GET", Type: "BUS", Description: "连接日志列表", ApiGroup: "连接日志", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1601: {Model: common.Model{ID: 1601}, Path: "/bus/v1/config", Action: "PUT", Type: "BUS", Description: "更新配置", ApiGroup: "配置", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, 1602: {Model: common.Model{ID: 1602}, Path: "/bus/v1/config", Action: "GET", Type: "BUS", Description: "获取配置", ApiGroup: "配置", ModelTime: common.ModelTime{CreatedAt: time.Now(), UpdatedAt: time.Now()}}, } func initApiData() error { entities := make([]model.Api, 0) for _, entity := range APIInitEntities { if entity.ID != 0 { entities = append(entities, entity) } } if err := global.DB.Clauses(clause.OnConflict{UpdateAll: true}).Create(&entities).Error; err != nil { return err } return nil }