houyaf 3 жил өмнө
parent
commit
cf0f16307d

+ 20 - 16
datamodels/api.go

@@ -3,23 +3,27 @@ package datamodels
 import "time"
 
 type Api struct {
-    ModuleId    int64     `json:"moduleId"        xorm:"'module_id'     bigint pk  pk comment('Module ID') "`
-    ApiId       int64     `json:"apiId"           xorm:"'api_id'        bigint     pk comment('Api ID')    "`
-    ApiType     int64     `json:"apiType"         xorm:"'api_type'      bigint        comment('Api Type')  "`
-    ApiTitle    string    `json:"apiTitle"        xorm:"'api_title'     varchar(127)  comment('名称')       "`
-    ApiCode     string    `json:"apiCode"         xorm:"'api_code'      varchar(127)  comment('编码')       "`
-    ApiParams   string    `json:"apiParams"       xorm:"'api_params'    varchar(127)  comment('Param')     "`
-    Status      int64     `json:"status"          xorm:"'status'        bigint        comment('Status')    "`
-    ApiDesc     string    `json:"apiDesc"         xorm:"'api_desc'      varchar(50)   comment('描述')       "`
-    CreatedBy   int64     `json:"createdBy"       xorm:"'created_by'"`
-    CreatedAt   time.Time `json:"createdAt"       xorm:"'created_at'"`
-    UpdatedBy   int64     `json:"updatedBy"       xorm:"'updated_by'"`
-    UpdatedAt   time.Time `json:"updatedAt"       xorm:"'updated_at'"`
-    DeletedFlag int64     `json:"deletedFlag"     xorm:"'deleted_flag'"`
-    DeletedBy   int64     `json:"deletedBy"       xorm:"'deleted_by'"`
-    DeletedAt   time.Time `json:"deletedAt"       xorm:"'deleted_at'"`
+    ModuleId        int64     `json:"moduleId"        xorm:"'module_id'     bigint pk  pk comment('Module ID') "`
+    ApiId           int64     `json:"apiId"           xorm:"'api_id'        bigint     pk comment('Api ID')    "`
+    ApiType         int64     `json:"apiType"         xorm:"'api_type'      bigint        comment('Api Type')  "`
+    ApiTitle        string    `json:"apiTitle"        xorm:"'api_title'     varchar(127)  comment('名称')       "`
+    ApiCode         string    `json:"apiCode"         xorm:"'api_code'      varchar(127)  comment('编码')       "`
+    ApiParams       string    `json:"apiParams"       xorm:"'api_params'    varchar(127)  comment('Param')     "`
+    Status          int64     `json:"status"          xorm:"'status'        bigint        comment('Status')    "`
+    ApiDesc         string    `json:"apiDesc"         xorm:"'api_desc'      varchar(50)   comment('描述')       "`
+    ObjectType      int64     `json:"objectType"      xorm:"'objectType'    bigint        comment('Object Type')"`
+    ObjectGroupId   int64     `json:"objectGroupId"   xorm:"'objectGroupId' bigint        comment('Object GroupId')"`
+    ObjectId        int64     `json:"objectId"        xorm:"'objectId'      bigint        comment('Object Id')  "`
+    OamId           int64     `json:"oamId"           xorm:"'oamId'         bigint        comment('Oam Id')  "`
+    CreatedBy       int64     `json:"createdBy"       xorm:"'created_by'"`
+    CreatedAt       time.Time `json:"createdAt"       xorm:"'created_at'"`
+    UpdatedBy       int64     `json:"updatedBy"       xorm:"'updated_by'"`
+    UpdatedAt       time.Time `json:"updatedAt"       xorm:"'updated_at'"`
+    DeletedFlag     int64     `json:"deletedFlag"     xorm:"'deleted_flag'"`
+    DeletedBy       int64     `json:"deletedBy"       xorm:"'deleted_by'"`
+    DeletedAt       time.Time `json:"deletedAt"       xorm:"'deleted_at'"`
 }
 
 func (t *Api) TableName() string {
-    return "ps_api"
+    return "api"
 }

+ 1 - 1
datamodels/api_log.go

@@ -15,5 +15,5 @@ type ApiLog struct {
 }
 
 func (t *ApiLog) TableName() string {
-    return "ps_api_req"
+    return "api_log"
 }

+ 0 - 23
datamodels/api_trans_unit.go

@@ -1,23 +0,0 @@
-package datamodels
-
-import "time"
-
-type ApiTransUnit struct {
-    ModuleId        int64       `json:"moduleId"        xorm:"'module_id'           bigint pk comment('Module ID')    "`
-    ApiId           int64       `json:"apiId"           xorm:"'api_id'              bigint pk comment('ApiId')    "`
-    AtuId           int64       `json:"atuId"           xorm:"'atu_id'              bigint pk comment('AtuId')    "`
-    ModelId         int64       `json:"modelId"         xorm:"'model_id'            bigint comment('ModelId')     "`
-    ObjectId        int64       `json:"objectId"        xorm:"'object_id'           bigint comment('ObjectId')    "`
-    OamId           int64       `json:"oamId"           xorm:"'oam_id'              bigint comment('OAM ID')      "`
-    CreatedBy       int64       `json:"createdBy"       xorm:"'created_by'"`
-    CreatedAt       time.Time   `json:"createdAt"       xorm:"'created_at'"`
-    UpdatedBy       int64       `json:"updatedBy"       xorm:"'updated_by'"`
-    UpdatedAt       time.Time   `json:"updatedAt"       xorm:"'updated_at'"`
-    DeletedFlag     int64       `json:"deletedFlag"     xorm:"'deleted_flag'"`
-    DeletedBy       int64       `json:"deletedBy"       xorm:"'deleted_by'"`
-    DeletedAt       time.Time   `json:"deletedAt"       xorm:"'deleted_at'"`
-}
-
-func (t *ApiTransUnit) TableName() string {
-    return "ps_api_trans_unit"
-}

+ 11 - 11
datamodels/app.go

@@ -3,19 +3,19 @@ package datamodels
 import "time"
 
 type App struct {
-	AppId       int64     `json:"appId"             xorm:"'app_id'      bigint     pk comment('主键ID')         "`
-	AppCatId    int64     `json:"appCatId"          xorm:"'app_cat_id'      bigint     pk comment('主键ID')         "`
+	AppId       int64     `json:"appId"             xorm:"'app_id'      bigint      pk comment('主键ID')   "`
+	AppCatId    int64     `json:"appCatId"          xorm:"'app_cat_id'  bigint      pk comment('主键ID')   "`
 	AppTitle    string    `json:"appTitle"          xorm:"'app_title'   varchar(127)   comment('名称')     "`
 	AppCode     string    `json:"appCode"           xorm:"'app_code'    varchar(127)   comment('编码')     "`
-	AppParam    string    `json:"appParam"          xorm:"'app_param'   varchar(127)   comment('Param')     "`
-	AppUrl      string    `json:"appUrl"            xorm:"'app_url'     varchar(511)   comment('Url')     "`
-	AppLog      string    `json:"appLogo"           xorm:"'app_logo'    varchar(255)   comment('Url')     "`
-	Status      int64     `json:"status"            xorm:"'status'      bigint         comment('Status')         "`
-	IfStore     int64     `json:"ifStore"           xorm:"'if_store'      bigint         comment('Status')         "`
-	AppKey      string    `json:"appKey"            xorm:"'app_key'     varchar(255)   comment('Url')     "`
-	AppSecret   string    `json:"appSecret"         xorm:"'app_secret'  varchar(255)   comment('Url')     "`
-	AppDesc     string    `json:"appDesc"           xorm:"'app_desc'    varchar(50)   comment('描述')            "`
-	IsFixed     int64     `json:"isFixed"           xorm:"'is_fixed'        int           comment('是否可修改')         "`
+	AppParam    string    `json:"appParam"          xorm:"'app_param'   varchar(127)   comment('Param')    "`
+	AppUrl      string    `json:"appUrl"            xorm:"'app_url'     varchar(511)   comment('Url')      "`
+	AppLog      string    `json:"appLogo"           xorm:"'app_logo'    varchar(255)   comment('Url')      "`
+	Status      int64     `json:"status"            xorm:"'status'      bigint         comment('Status')   "`
+	IfStore     int64     `json:"ifStore"           xorm:"'if_store'    bigint         comment('Status')   "`
+	AppKey      string    `json:"appKey"            xorm:"'app_key'     varchar(255)   comment('Url')      "`
+	AppSecret   string    `json:"appSecret"         xorm:"'app_secret'  varchar(255)   comment('Url')      "`
+	AppDesc     string    `json:"appDesc"           xorm:"'app_desc'    varchar(50)    comment('描述')       "`
+	IsFixed     int64     `json:"isFixed"           xorm:"'is_fixed'    bigint         comment('是否可修改')  "`
 	CreatedBy   int64     `json:"createdBy"         xorm:"'created_by'"`
 	CreatedAt   time.Time `json:"createdAt"         xorm:"'created_at'"`
 	UpdatedBy   int64     `json:"updatedBy"         xorm:"'updated_by'"`

+ 2 - 2
datamodels/app_cat.go

@@ -3,10 +3,10 @@ package datamodels
 import "time"
 
 type AppCat struct {
-    AppCatId      int64     `json:"appCatId"        xorm:"'app_cat_id'      bigint     pk comment('主键ID')         "`
+    AppCatId      int64     `json:"appCatId"        xorm:"'app_cat_id'      bigint     pk comment('主键ID')          "`
     AppCatTitle   string    `json:"appCatTitle"     xorm:"'app_cat_title'   varchar(50)   comment('群组类型名称')     "`
     AppCatDesc    string    `json:"appCatDesc"      xorm:"'app_cat_desc'    varchar(50)   comment('描述')            "`
-    IsFixed       int64     `json:"isFixed"         xorm:"'is_fixed'        int           comment('是否可修改')         "`
+    IsFixed       int64     `json:"isFixed"         xorm:"'is_fixed'        int           comment('是否可修改')       "`
     CreatedBy     int64     `json:"createdBy"       xorm:"'created_by'"`
     CreatedAt     time.Time `json:"createdAt"       xorm:"'created_at'"`
     UpdatedBy     int64     `json:"updatedBy"       xorm:"'updated_by'"`

+ 10 - 10
datamodels/app_permit.go

@@ -3,16 +3,16 @@ package datamodels
 import "time"
 
 type AppPermit struct {
-	AppId       int64     `json:"appId"           xorm:"'app_id'            bigint     pk comment('APP ID')"`
-	RoleId      int64     `json:"roleId"          xorm:"'role_id'           bigint     pk comment('Role ID')"`
-	PermitId    int64     `json:"permitId"        xorm:"'permit_id'         bigint     pk comment('Permit ID')  "`
-	PermitTitle string    `json:"permitTitle"     xorm:"'permit_title'      varchar(127)  comment('标题')      "`
-	PermitCode  string    `json:"permitCode"      xorm:"'permit_code'       varchar(127)  comment('CODE')     "`
-	PermitDesc  string    `json:"permitDesc"      xorm:"'permit_desc'       varchar(511)  comment('描述')      "`
-	PermitType  int64     `json:"permitType"      xorm:"'permit_type'       int           comment('Type') "`
-	RootId      int64     `json:"rootId"          xorm:"'root_id'           int           comment('Root Id') "`
-	ParentId    int64     `json:"parentId"        xorm:"'parent_id'         int           comment('Parent Id') "`
-	SortNo      int64     `json:"sortNo"          xorm:"'sort_no'           int           comment('Sort No') "`
+	AppId       int64     `json:"appId"           xorm:"'app_id'            bigint     pk comment('APP ID')    "`
+	RoleId      int64     `json:"roleId"          xorm:"'role_id'           bigint     pk comment('Role ID')   "`
+	PermitId    int64     `json:"permitId"        xorm:"'permit_id'         bigint     pk comment('Permit ID') "`
+	PermitTitle string    `json:"permitTitle"     xorm:"'permit_title'      varchar(127)  comment('标题')       "`
+	PermitCode  string    `json:"permitCode"      xorm:"'permit_code'       varchar(127)  comment('CODE')      "`
+	PermitDesc  string    `json:"permitDesc"      xorm:"'permit_desc'       varchar(511)  comment('描述')       "`
+	PermitType  int64     `json:"permitType"      xorm:"'permit_type'       int           comment('Type')       "`
+	RootId      int64     `json:"rootId"          xorm:"'root_id'           int           comment('Root Id')    "`
+	ParentId    int64     `json:"parentId"        xorm:"'parent_id'         int           comment('Parent Id')  "`
+	SortNo      int64     `json:"sortNo"          xorm:"'sort_no'           int           comment('Sort No')    "`
 	CreatedBy   int64     `json:"createdBy"       xorm:"'created_by'"`
 	CreatedAt   time.Time `json:"createdAt"       xorm:"'created_at'"`
 	UpdatedBy   int64     `json:"updatedBy"       xorm:"'updated_by'"`