mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-29 09:41:25 +08:00
visual
This commit is contained in:
@@ -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"
|
||||
}
|
||||
*/
|
||||
|
||||
@@ -4,14 +4,13 @@ import "github.com/XM-GO/PandaKit/model"
|
||||
|
||||
type VisualDataSource struct {
|
||||
model.BaseModel
|
||||
SourceId string `gorm:"source_id;comment:数据源Id" json:"sourceId"` // 数据源Id
|
||||
SourceId string `gorm:"primary_key;source_id;comment:数据源Id" json:"sourceId"` // 数据源Id
|
||||
SourceType string `gorm:"source_type;type:varchar(50);comment:数据源类型" json:"sourceType"` // 数据源类型
|
||||
SourceName string `gorm:"source_name;type:varchar(50);comment:数据源名称" json:"sourceName"` // 原名称
|
||||
SourceComment string `gorm:"source_comment;type:varchar(50);comment:数据源描述" json:"source_comment"` // 描述
|
||||
Status string `gorm:"status;type:varchar(1);comment:数据源状态" json:"status"`
|
||||
Configuration string `gorm:"configuration;type:text;comment:详细信息" json:"configuration"`
|
||||
CreateBy int64 `gorm:"api" json:"createBy"` //创建人ID
|
||||
|
||||
}
|
||||
|
||||
type VisualDb struct {
|
||||
@@ -25,7 +24,7 @@ type VisualDb struct {
|
||||
|
||||
type VisualApi struct {
|
||||
Method string `gorm:"method" json:"method"`
|
||||
url string `gorm:"url" json:"url"`
|
||||
Url string `gorm:"url" json:"url"`
|
||||
Headers map[string]interface{} `gorm:"headers" json:"headers"`
|
||||
RequestBody string `gorm:"db_username" json:"dbUsername"`
|
||||
Auth string `gorm:"db_password" json:"dbPassword"`
|
||||
|
||||
@@ -5,14 +5,17 @@ import (
|
||||
)
|
||||
|
||||
type VisualRuleChain struct {
|
||||
UserId string `json:"userId"`
|
||||
RuleId string `json:"ruleId"`
|
||||
RuleName string `json:"ruleName"`
|
||||
RuleDataJson string `json:"ruleDataJson"`
|
||||
RuleBase64 string `json:"ruleBase64"` //缩略图 base64
|
||||
RuleRemark string `json:"ruleRemark"`
|
||||
Status string `json:"status"`
|
||||
DeviceId string `json:"deviceId"`
|
||||
UserId string `gorm:"userId;type:varchar(64);comment:用户Id" json:"userId"`
|
||||
RuleId string `gorm:"primary_key;" json:"ruleId"`
|
||||
RuleName string `gorm:"ruleName;type:varchar(50);comment:名称" json:"ruleName"`
|
||||
RuleDataJson string `gorm:"ruleDataJson;type:varchar(50);comment:Json数据" json:"ruleDataJson"`
|
||||
RuleBase64 string `gorm:"ruleBase64;type:varchar(50);comment:Base64缩略图" json:"ruleBase64"` //缩略图 base64
|
||||
RuleRemark string `gorm:"ruleRemark;type:varchar(50);comment:说明" json:"ruleRemark"`
|
||||
Status string `gorm:"status;type:varchar(50);comment:状态" json:"status"`
|
||||
Creator string `json:"creator"` //创建者
|
||||
model.BaseModel
|
||||
}
|
||||
|
||||
func (VisualRuleChain) TableName() string {
|
||||
return "visual_rule_chain"
|
||||
}
|
||||
|
||||
19
apps/visual/entity/screen.go
Normal file
19
apps/visual/entity/screen.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package entity
|
||||
|
||||
import "github.com/XM-GO/PandaKit/model"
|
||||
|
||||
type VisualScreen struct {
|
||||
UserId string `gorm:"userId;type:varchar(64);comment:用户Id" json:"userId"`
|
||||
ScreenId string `gorm:"primary_key;" json:"screenId"`
|
||||
ScreenName string `gorm:"screenName;type:varchar(50);comment:名称" json:"screenName"`
|
||||
ScreenDataJson string `gorm:"screenDataJson;type:varchar(50);comment:Json数据" json:"screenDataJson"`
|
||||
ScreenBase64 string `gorm:"screenBase64;type:varchar(50);comment:Base64缩略图" json:"screenBase64"` //缩略图 base64
|
||||
ScreenRemark string `gorm:"screenRemark;type:varchar(50);comment:说明" json:"screenRemark"`
|
||||
Status string `gorm:"status;type:varchar(50);comment:状态" json:"status"`
|
||||
Creator string `json:"creator"` //创建者
|
||||
model.BaseModel
|
||||
}
|
||||
|
||||
func (VisualScreen) TableName() string {
|
||||
return "visual_screen"
|
||||
}
|
||||
27
apps/visual/entity/visual_data_set_table_task.go
Normal file
27
apps/visual/entity/visual_data_set_table_task.go
Normal file
@@ -0,0 +1,27 @@
|
||||
// ==========================================================================
|
||||
// 生成日期:2023-04-10 11:31:34 +0800 CST
|
||||
// 生成路径: apps/visual/entity/visual_data_set_table_task.go
|
||||
// 生成人:panda
|
||||
// ==========================================================================
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/XM-GO/PandaKit/model"
|
||||
)
|
||||
|
||||
type VisualDataSetTableTask struct {
|
||||
TableId string `gorm:"table_id;type:varchar(64);comment:表ID" json:"tableId" ` // 表ID
|
||||
Id string `gorm:"primary_key;" json:"id"` // ID
|
||||
StartTime int64 `gorm:"start_time;type:bigint;comment:开始时间" json:"startTime" ` // 开始时间
|
||||
End string `gorm:"end;type:varchar(50);comment:结束限制 0 无限制 1 设定结束时间" json:"end" ` // 结束限制 0 无限制 1 设定结束时间
|
||||
EndTime int64 `gorm:"end_time;type:bigint;comment:结束时间" json:"endTime" ` // 结束时间
|
||||
Name string `gorm:"name;type:varchar(255);comment:任务名称" json:"name" binding:"required"` // 任务名称
|
||||
Cron string `gorm:"cron;type:varchar(255);comment:cron表达式" json:"cron" ` // cron表达式
|
||||
Type string `gorm:"type;type:varchar(50);comment:更新方式:0-全量更新 1-增量更新" json:"type" ` // 更新方式:0-全量更新 1-增量更新
|
||||
Rate string `gorm:"rate;type:varchar(50);comment:执行频率:0 一次性 1 cron" json:"rate" ` // 执行频率:0 一次性 1 cron
|
||||
model.BaseModelD
|
||||
}
|
||||
|
||||
func (VisualDataSetTableTask) TableName() string {
|
||||
return "visual_data_set_table_task"
|
||||
}
|
||||
23
apps/visual/entity/visual_data_set_table_task_log.go
Normal file
23
apps/visual/entity/visual_data_set_table_task_log.go
Normal file
@@ -0,0 +1,23 @@
|
||||
// ==========================================================================
|
||||
// 生成日期:2023-04-10 11:31:34 +0800 CST
|
||||
// 生成路径: apps/visual/entity/visual_data_set_table_task_log.go
|
||||
// 生成人:panda
|
||||
// ==========================================================================
|
||||
package entity
|
||||
|
||||
import "github.com/XM-GO/PandaKit/model"
|
||||
|
||||
type VisualDataSetTableTaskLog struct {
|
||||
TaskId string `gorm:"task_id;type:varchar(50);comment:任务ID" json:"taskId" ` // 任务ID
|
||||
Id string `gorm:"primary_key;" json:"id"` // ID
|
||||
Status string `gorm:"status;type:varchar(50);comment:执行状态" json:"status" binding:"required"` // 执行状态
|
||||
CreateTime int64 `gorm:"create_time;type:bigint;comment:创建时间" json:"createTime" ` // 创建时间
|
||||
Info string `gorm:"info;type:text;comment:错误信息" json:"info" ` // 错误信息
|
||||
EndTime int64 `gorm:"end_time;type:bigint;comment:结束时间" json:"endTime" ` // 结束时间
|
||||
TableId string `gorm:"table_id;type:varchar(50);comment:表ID" json:"tableId" ` // 表ID
|
||||
model.BaseModelD
|
||||
}
|
||||
|
||||
func (VisualDataSetTableTaskLog) TableName() string {
|
||||
return "visual_data_set_table_task_log"
|
||||
}
|
||||
Reference in New Issue
Block a user