This commit is contained in:
XM-GO
2023-04-10 13:42:49 +08:00
parent 282668c0f9
commit cde9c75791
34 changed files with 1816 additions and 46 deletions

View File

@@ -2,21 +2,46 @@ package entity
import "github.com/XM-GO/PandaKit/model"
// VisualDataSetGroup 数据集分组
type VisualDataSetGroup struct {
model.BaseModelD
Id string `gorm:"primary_key;id;type:varchar(64);" json:"id"`
Name string `gorm:"name;type:varchar(64);comment:数据源类型" json:"name"`
Pid string `json:"pid"`
Level int64 `json:"level"`
Pid string `gorm:"pid;type:varchar(64);comment:父Id" json:"pid"`
Level int64 `gorm:"level;type:int;comment:等级" json:"level"`
}
/*type VisualDataSetTable struct {
model.BaseModelD
TableId string `gorm:"name;type:TEXT;comment:表id" json:"tableId"`
DataSourceId string `gorm:"name;type:TEXT;comment:数据圆ID" json:"data_source_Id"`
TableType string `gorm:"name;type:TEXT;comment:db,sql,excel,custom,api" json:"tableType"` //'db,sql,excel,custom',
Mode string `gorm:"name;type:TEXT;comment:原始表信息" json:"mode"` //'连接模式0-直连1-定时同步',
Info string `gorm:"name;type:TEXT;comment:原始表信息" json:"name"`
CreateBy int64 `gorm:"create_by" json:"createBy"` //创建人ID
Columns []DevGenTableColumn `gorm:"-" json:"columns"` //字段信息
func (VisualDataSetGroup) TableName() string {
return "visual_data_set_group"
}
type VisualDataSetTable struct {
model.BaseModelD
TableId string `gorm:"primary_key;tableId;comment:表id" json:"tableId"`
DataSourceId string `gorm:"dataSourceId;type:varchar(64);comment:数据圆ID" json:"dataSourceId"`
TableType string `gorm:"tableType;type:varchar(64);comment:db,sql,excel,custom,api" json:"tableType"` //'db,sql,excel,custom',
Mode string `gorm:"mode;type:varchar(1);comment:原始表信息" json:"mode"` //'连接模式0-直连1-定时同步',
Info string `gorm:"info;type:TEXT;comment:原始表信息" json:"info"`
CreateBy int64 `gorm:"create_by" json:"createBy"` //创建人ID
Fields []VisualDataSetField `gorm:"-" json:"fields"` //字段信息
}
func (VisualDataSetTable) TableName() string {
return "visual_data_set_table"
}
type VisualDataSetField struct {
model.BaseModelD
FieldId string `gorm:"primary_key;fieldId;comment:表id" json:"fieldId"`
TableId string `gorm:"tableId;type:varchar(64);comment:表id" json:"tableId"`
Comment string `gorm:"comment;type:varchar(64);comment:字段描述" json:"columnComment"` // 列描述
Name string `gorm:"name;type:varchar(64);comment:字段名" json:"name"`
Type string `gorm:"type;type:varchar(50);comment:字段类型" json:"type"`
GoType string `gorm:"go_type;type:varchar(50);comment:go字段类型" json:"goType"` // Go类型
GoField string `gorm:"go_field;type:varchar(50);comment:go对应字段" json:"goField"` // Go字段名
JsonField string `gorm:"json_field;type:varchar(50);comment:json对应字段" json:"jsonField"`
}
func (VisualDataSetField) TableName() string {
return "visual_data_set_field"
}
*/