From b3cfeaad09f6c7fabdfeb757b83e4475a2625a34 Mon Sep 17 00:00:00 2001 From: wangshuai Date: Wed, 26 Aug 2020 15:06:23 +0800 Subject: [PATCH] COPY dsDataex/GenXorm/models TO dsSupport/models --- dsSupport/models/t_dataex_dataaccess.go | 21 +++++++++++++ dsSupport/models/t_dataex_datasource.go | 24 +++++++++++++++ dsSupport/models/t_dataex_error.go | 21 +++++++++++++ dsSupport/models/t_dataex_jyt2012.go | 20 +++++++++++++ dsSupport/models/t_dataex_metadata.go | 27 +++++++++++++++++ dsSupport/models/t_dataex_orgtree.go | 40 +++++++++++++++++++++++++ 6 files changed, 153 insertions(+) create mode 100644 dsSupport/models/t_dataex_dataaccess.go create mode 100644 dsSupport/models/t_dataex_datasource.go create mode 100644 dsSupport/models/t_dataex_error.go create mode 100644 dsSupport/models/t_dataex_jyt2012.go create mode 100644 dsSupport/models/t_dataex_metadata.go create mode 100644 dsSupport/models/t_dataex_orgtree.go diff --git a/dsSupport/models/t_dataex_dataaccess.go b/dsSupport/models/t_dataex_dataaccess.go new file mode 100644 index 00000000..8c54d819 --- /dev/null +++ b/dsSupport/models/t_dataex_dataaccess.go @@ -0,0 +1,21 @@ +package models + +import ( + "time" +) + +type TDataexDataaccess struct { + Id string `json:"id" xorm:"not null pk comment('ID') VARCHAR(36)"` + DatasourceId string `json:"datasource_id" xorm:"not null comment('数据源ID') index VARCHAR(36)"` + DatasourceCode string `json:"datasource_code" xorm:"default 'NULL' VARCHAR(255)"` + ConsumeSystemid string `json:"consume_systemid" xorm:"not null comment('数据使用系统ID') index VARCHAR(36)"` + QueryFlag int `json:"query_flag" xorm:"not null default 1 comment('可查【1:是,-1:否】') INT(11)"` + SetFlag int `json:"set_flag" xorm:"not null default -1 comment('可修改【1:是,-1:否】') INT(11)"` + ConsumeType int `json:"consume_type" xorm:"not null comment('使用数据范围【1:本机构,2:本机构以及下属机构,-1:不限制】') INT(11)"` + ConsumeOrgid string `json:"consume_orgid" xorm:"not null comment('使用数据机构ID【-1:不限制】') index VARCHAR(36)"` + CreateTime time.Time `json:"create_time" xorm:"default 'NULL' created comment('建立时间') DATETIME"` + ChangeTime time.Time `json:"change_time" xorm:"default 'NULL' updated comment('最近修改时间') DATETIME"` + DeleteTime time.Time `json:"delete_time" xorm:"default 'NULL' deleted comment('删除时间') DATETIME"` + DeleteFlag int `json:"delete_flag" xorm:"not null default -1 comment('删除标志【默认-1,1:删除,-1:正常】') INT(11)"` + EnableFlag int `json:"enable_flag" xorm:"not null default 1 comment('启用标志【默认1,1:启用,-1:禁用】') INT(11)"` +} diff --git a/dsSupport/models/t_dataex_datasource.go b/dsSupport/models/t_dataex_datasource.go new file mode 100644 index 00000000..4f0f913c --- /dev/null +++ b/dsSupport/models/t_dataex_datasource.go @@ -0,0 +1,24 @@ +package models + +import ( + "time" +) + +type TDataexDatasource struct { + Id string `json:"id" xorm:"not null pk comment('数据源ID') VARCHAR(36)"` + SystemId string `json:"system_id" xorm:"not null comment('数据提供系统ID【外键】') index VARCHAR(36)"` + DatasourceName string `json:"datasource_name" xorm:"not null comment('数据源名称') VARCHAR(100)"` + DatasourceCode string `json:"datasource_code" xorm:"not null comment('数据源编码') VARCHAR(36)"` + DatasourceDetail string `json:"datasource_detail" xorm:"default 'NULL' comment('数据源说明') VARCHAR(500)"` + SetFlag int `json:"set_flag" xorm:"not null default 1 comment('可修改【1:是,-1:否】') INT(11)"` + CollectFlag int `json:"collect_flag" xorm:"not null default 1 comment('可汇集【1:是,-1:否】') INT(11)"` + ProvideType int `json:"provide_type" xorm:"not null comment('提供数据范围【1:本机构,2:本机构以及下属机构,-1:不限制】') INT(11)"` + ProvideOrgid string `json:"provide_orgid" xorm:"not null comment('提供数据机构ID【-1:默认根机构】') index VARCHAR(36)"` + DatastoreType int `json:"datastore_type" xorm:"not null comment('数据存储类型【1:DB,2:ES,3:Kafka】') INT(11)"` + DicId string `json:"dic_id" xorm:"default 'NULL' comment('数据字典ID') index VARCHAR(36)"` + CreateTime time.Time `json:"create_time" xorm:"default 'NULL' created comment('建立时间') DATETIME"` + ChangeTime time.Time `json:"change_time" xorm:"default 'NULL' updated comment('最近修改时间') DATETIME"` + DeleteTime time.Time `json:"delete_time" xorm:"default 'NULL' deleted comment('删除时间') DATETIME"` + DeleteFlag int `json:"delete_flag" xorm:"not null default -1 comment('删除标志【默认-1,1:删除,-1:正常】') INT(11)"` + EnableFlag int `json:"enable_flag" xorm:"not null default 1 comment('启用标志【默认1,1:启用,-1:禁用】') INT(11)"` +} diff --git a/dsSupport/models/t_dataex_error.go b/dsSupport/models/t_dataex_error.go new file mode 100644 index 00000000..a01e82a8 --- /dev/null +++ b/dsSupport/models/t_dataex_error.go @@ -0,0 +1,21 @@ +package models + +import ( + "time" +) + +type TDataexError struct { + Id string `json:"id" xorm:"not null pk comment('ID') VARCHAR(36)"` + SystemId string `json:"system_id" xorm:"not null comment('数据提供系统ID【输入参数】') VARCHAR(36)"` + DatasourceId string `json:"datasource_id" xorm:"not null comment('数据源ID【输入参数】') VARCHAR(36)"` + OrgId string `json:"org_id" xorm:"not null comment('数据机构ID【输入参数】') VARCHAR(36)"` + DataId string `json:"data_id" xorm:"not null comment('数据ID【输入参数】') VARCHAR(36)"` + DataContent string `json:"data_content" xorm:"default 'NULL' comment('数据内容【Json格式输入参数】') VARCHAR"` + FileUri string `json:"file_uri" xorm:"default 'NULL' comment('文件地址【文件交换】') VARCHAR(500)"` + ErrorInfo string `json:"error_info" xorm:"default 'NULL' comment('错误信息说明') VARCHAR(5000)"` + CreateTime time.Time `json:"create_time" xorm:"default 'NULL' created comment('建立时间') DATETIME"` + ChangeTime time.Time `json:"change_time" xorm:"default 'NULL' updated comment('最近修改时间') DATETIME"` + DeleteTime time.Time `json:"delete_time" xorm:"default 'NULL' deleted comment('删除时间') DATETIME"` + EnableFlag int `json:"enable_flag" xorm:"not null default 1 comment('启用标志【默认1,1:启用,-1:禁用】') INT(11)"` + DeleteFlag int `json:"delete_flag" xorm:"not null default -1 comment('删除标志【默认-1,1:删除,-1:正常】') INT(11)"` +} diff --git a/dsSupport/models/t_dataex_jyt2012.go b/dsSupport/models/t_dataex_jyt2012.go new file mode 100644 index 00000000..901c6f82 --- /dev/null +++ b/dsSupport/models/t_dataex_jyt2012.go @@ -0,0 +1,20 @@ +package models + +import ( + "time" +) + +type TDataexJyt2012 struct { + Id string `json:"id" xorm:"not null pk comment('ID') VARCHAR(36)"` + DicName string `json:"dic_name" xorm:"not null comment('字典/字典项名称') VARCHAR(100)"` + DicType int `json:"dic_type" xorm:"not null default 1 comment('字典类型【1:国标数据、关联数据源,2:国标字典、关联元数据】') INT(11)"` + DicInfo string `json:"dic_info" xorm:"default ''NULL'' comment('字典相信说明') VARCHAR(500)"` + RootFlag int `json:"root_flag" xorm:"not null default -1 comment('是否是字典【1:是,-1:否】') INT(11)"` + JytFlag int `json:"jyt_flag" xorm:"not null default 1 comment('是否国标【1:是,-1:自定义】') INT(11)"` + ParentId string `json:"parent_id" xorm:"default ''NULL'' comment('字典ID【字典项父节点】') VARCHAR(36)"` + CreateTime time.Time `json:"create_time" xorm:"default 'NULL' created comment('建立时间') DATETIME"` + ChangeTime time.Time `json:"change_time" xorm:"default 'NULL' updated comment('最近修改时间') DATETIME"` + DeleteTime time.Time `json:"delete_time" xorm:"default 'NULL' deleted comment('删除时间') DATETIME"` + DeleteFlag int `json:"delete_flag" xorm:"not null default -1 comment('删除标志【默认-1,1:删除,-1:正常】') INT(11)"` + EnableFlag int `json:"enable_flag" xorm:"not null default 1 comment('启用标志【默认1,1:启用,-1:禁用】') INT(11)"` +} diff --git a/dsSupport/models/t_dataex_metadata.go b/dsSupport/models/t_dataex_metadata.go new file mode 100644 index 00000000..94c6f384 --- /dev/null +++ b/dsSupport/models/t_dataex_metadata.go @@ -0,0 +1,27 @@ +package models + +import ( + "time" +) + +type TDataexMetadata struct { + Id string `json:"id" xorm:"not null pk comment('ID') VARCHAR(36)"` + DatasourceId string `json:"datasource_id" xorm:"default ''NULL'' comment('数据源ID') index VARCHAR(36)"` + ItemName string `json:"item_name" xorm:"not null comment('数据项名称【英文】') VARCHAR(50)"` + DicId string `json:"dic_id" xorm:"default ''NULL'' comment('数据字典ID') index VARCHAR(36)"` + ItemType string `json:"item_type" xorm:"default ''NULL'' comment('数据项类型 +【1:整数、2:浮点、3:字符、4:布尔、5:日期、6:时间、7:日期+时间】') VARCHAR(50)"` + ItemLength int `json:"item_length" xorm:"default NULL comment('数据最大长度【UTF-8 字符长度】') INT(11)"` + ItemPattern string `json:"item_pattern" xorm:"default 'NULL' comment('数据项模式') VARCHAR(255)"` + ItemInfo string `json:"item_info" xorm:"not null comment('数据项说明') VARCHAR(50)"` + CheckName int `json:"check_name" xorm:"not null default -1 comment('是否检测名称【1:是,-1:否】') INT(11)"` + CheckDic int `json:"check_dic" xorm:"not null default -1 comment('是否检测字典') INT(11)"` + CheckType int `json:"check_type" xorm:"not null default -1 comment('是否检测类型') INT(11)"` + CheckPattern int `json:"check_pattern" xorm:"not null default -1 comment('是否检测模式') INT(11)"` + CheckExist int `json:"check_exist" xorm:"not null default -1 comment('是否检测必填') INT(11)"` + CreateTime time.Time `json:"create_time" xorm:"default 'NULL' created comment('建立时间') DATETIME"` + ChangeTime time.Time `json:"change_time" xorm:"default 'NULL' updated comment('最近修改时间') DATETIME"` + DeleteTime time.Time `json:"delete_time" xorm:"default 'NULL' deleted comment('删除时间') DATETIME"` + DeleteFlag int `json:"delete_flag" xorm:"not null default -1 comment('删除标志【默认-1,1:删除,-1:正常】') INT(11)"` + EnableFlag int `json:"enable_flag" xorm:"not null default 1 comment('启用标志【默认1,1:启用,-1:禁用】') INT(11)"` +} diff --git a/dsSupport/models/t_dataex_orgtree.go b/dsSupport/models/t_dataex_orgtree.go new file mode 100644 index 00000000..cc233168 --- /dev/null +++ b/dsSupport/models/t_dataex_orgtree.go @@ -0,0 +1,40 @@ +package models + +import ( + "time" +) + +type TDataexOrgtree struct { + Id string `json:"id" xorm:"not null pk comment('ID【根节点默认为-1】') VARCHAR(36)"` + OrgName string `json:"org_name" xorm:"not null comment('机构名称') VARCHAR(100)"` + OrgType int `json:"org_type" xorm:"not null comment('机构类型【1:教育局、2:学校、3:教辅单位、4:大学区、5:部门、6、主校,7、学段、8:年级、9:班级】') INT(11)"` + SchoolType string `json:"school_type" xorm:"default '''' comment('学校办学类别 +【111:幼儿园 +211:小学 +218:小学教学点 +311:初级中学 +312:九年一贯制学校 +321:职业初中 +341:完全中学 +342:高级中学 +345:十二年一贯制学校 +361:中等职业学校 +365:职业高中学校 +411:大学 +415:高等职业学校 +426:广播电视大学 +514:特殊教育学校 +933:其他培训机构】') VARCHAR(3)"` + ParentId string `json:"parent_id" xorm:"not null default ''NULL'' comment('父节点ID') VARCHAR(36)"` + CatId string `json:"cat_id" xorm:"default 'NULL' comment('层级ID【4位数字一组、右侧多级累加】') VARCHAR(100)"` + ProvinceId string `json:"province_id" xorm:"default 'NULL' comment('省编码') VARCHAR(6)"` + CityId string `json:"city_id" xorm:"default 'NULL' comment('地市编码') VARCHAR(6)"` + AreaId string `json:"area_id" xorm:"default 'NULL' comment('县区编码') VARCHAR(6)"` + LinksystemId string `json:"linksystem_id" xorm:"default 'NULL' comment('源业务系统') VARCHAR(36)"` + LinkId string `json:"link_id" xorm:"default 'NULL' comment('业务系统机构原ID') VARCHAR(36)"` + CreateTime time.Time `json:"create_time" xorm:"default 'NULL' created comment('建立时间') DATETIME"` + ChangeTime time.Time `json:"change_time" xorm:"default 'NULL' updated comment('最近修改时间') DATETIME"` + DeleteTime time.Time `json:"delete_time" xorm:"default 'NULL' deleted comment('删除时间') DATETIME"` + DeleteFlag int `json:"delete_flag" xorm:"not null default -1 comment('删除标志【默认-1,1:删除,-1:正常】') INT(11)"` + EnableFlag int `json:"enable_flag" xorm:"not null default 1 comment('启用标志【默认1,1:启用,-1:禁用】') INT(11)"` +}