99 lines
4.0 KiB
Go
99 lines
4.0 KiB
Go
package dict
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
// FieldMappingConfig 字段映射配置实体
|
|
type FieldMappingConfig struct {
|
|
Id int64 `json:"id,string" dc:"配置ID"`
|
|
ConfigName string `json:"configName" dc:"配置名称"`
|
|
VendorName string `json:"vendorName" dc:"厂商名称"`
|
|
ApiName string `json:"apiName" dc:"接口名称"`
|
|
ApiVersion string `json:"apiVersion" dc:"接口版本"`
|
|
SourceField string `json:"sourceField" dc:"源字段名"`
|
|
SourceFieldType string `json:"sourceFieldType" dc:"源字段数据类型"`
|
|
SourceFieldDesc string `json:"sourceFieldDesc" dc:"源字段描述"`
|
|
TargetField string `json:"targetField" dc:"目标字段名"`
|
|
TargetFieldType string `json:"targetFieldType" dc:"目标数据类型"`
|
|
TargetFieldDesc string `json:"targetFieldDesc" dc:"字段描述"`
|
|
TransformType string `json:"transformType" dc:"转换类型"`
|
|
TransformParams map[string]interface{} `json:"transformParams" dc:"转换参数"`
|
|
ValidationRules map[string]interface{} `json:"validationRules" dc:"验证规则"`
|
|
DefaultValue string `json:"defaultValue" dc:"默认值"`
|
|
IsRequired bool `json:"isRequired" dc:"是否必填"`
|
|
IsActive bool `json:"isActive" dc:"是否启用"`
|
|
Priority int `json:"priority" dc:"优先级"`
|
|
BusinessDomain string `json:"businessDomain" dc:"业务域"`
|
|
FieldGroup string `json:"fieldGroup" dc:"字段分组"`
|
|
ConfigVersion int `json:"configVersion" dc:"配置版本号"`
|
|
EffectiveDate *time.Time `json:"effectiveDate" dc:"生效时间"`
|
|
ExpiryDate *time.Time `json:"expiryDate" dc:"失效时间"`
|
|
CreatedBy string `json:"createdBy" dc:"创建人"`
|
|
CreatedTime time.Time `json:"createdTime" dc:"创建时间"`
|
|
UpdatedBy string `json:"updatedBy" dc:"更新人"`
|
|
UpdatedTime time.Time `json:"updatedTime" dc:"更新时间"`
|
|
}
|
|
|
|
// FieldMappingConfigCols 字段映射配置表列名
|
|
type FieldMappingConfigCols struct {
|
|
Id string
|
|
ConfigName string
|
|
VendorName string
|
|
ApiName string
|
|
ApiVersion string
|
|
SourceField string
|
|
SourceFieldType string
|
|
SourceFieldDesc string
|
|
TargetField string
|
|
TargetFieldType string
|
|
TargetFieldDesc string
|
|
TransformType string
|
|
TransformParams string
|
|
ValidationRules string
|
|
DefaultValue string
|
|
IsRequired string
|
|
IsActive string
|
|
Priority string
|
|
BusinessDomain string
|
|
FieldGroup string
|
|
ConfigVersion string
|
|
EffectiveDate string
|
|
ExpiryDate string
|
|
CreatedBy string
|
|
CreatedTime string
|
|
UpdatedBy string
|
|
UpdatedTime string
|
|
}
|
|
|
|
// FieldMappingConfigCol 字段映射配置表列名常量
|
|
var FieldMappingConfigCol = FieldMappingConfigCols{
|
|
Id: "id",
|
|
ConfigName: "config_name",
|
|
VendorName: "vendor_name",
|
|
ApiName: "api_name",
|
|
ApiVersion: "api_version",
|
|
SourceField: "source_field",
|
|
SourceFieldType: "source_field_type",
|
|
SourceFieldDesc: "source_field_desc",
|
|
TargetField: "target_field",
|
|
TargetFieldType: "target_field_type",
|
|
TargetFieldDesc: "target_field_desc",
|
|
TransformType: "transform_type",
|
|
TransformParams: "transform_params",
|
|
ValidationRules: "validation_rules",
|
|
DefaultValue: "default_value",
|
|
IsRequired: "is_required",
|
|
IsActive: "is_active",
|
|
Priority: "priority",
|
|
BusinessDomain: "business_domain",
|
|
FieldGroup: "field_group",
|
|
ConfigVersion: "config_version",
|
|
EffectiveDate: "effective_date",
|
|
ExpiryDate: "expiry_date",
|
|
CreatedBy: "created_by",
|
|
CreatedTime: "created_time",
|
|
UpdatedBy: "updated_by",
|
|
UpdatedTime: "updated_time",
|
|
}
|