package schsdk import ( cdssdk "gitlink.org.cn/cloudream/common/sdks/storage" "time" ) type App struct { ID int64 `gorm:"primaryKey;autoIncrement;column:id" json:"id,string"` Name string `gorm:"column:name;type:varchar(200);not null" json:"name"` // 应用名称 Description string `gorm:"column:description;type:varchar(500);default:null" json:"description"` // 应用描述 Version string `gorm:"column:version;type:varchar(100);not null" json:"version"` // 应用版本 Status string `gorm:"column:status;type:tinyint(1);default:1;not null" json:"status"` // 应用状态 (0:禁用, 1:正常) UserID cdssdk.UserID `gorm:"column:user_id;type:bigint;default:null" json:"userID"` // 创建者 CreatedAt time.Time `gorm:"column:created_at;type:timestamp;default:CURRENT_TIMESTAMP" json:"createdAt"` // 创建时间 UpdatedAt time.Time `gorm:"column:updated_at;type:timestamp;default:null;onUpdate:CURRENT_TIMESTAMP" json:"updatedAt"` // 更新时间 DeletedAt time.Time `gorm:"column:deleted_at;type:timestamp;default:null" json:"-"` // 删除时间 } type AppInstanceDao struct { ID int64 `gorm:"primaryKey;autoIncrement;column:id" json:"id"` // 实例ID Name string `gorm:"column:name;type:varchar(200);not null" json:"name"` // 实例名称 Description string `gorm:"column:description;type:varchar(500);default:null" json:"description"` // 实例描述 Content string `gorm:"column:content;type:text;default:null" json:"content"` // 实例内容 AppID int64 `gorm:"column:app_id;type:bigint;not null" json:"appID"` // 关联应用ID AppName string `gorm:"-" json:"appName"` // 应用名称 UserID cdssdk.UserID `gorm:"column:user_id;type:bigint;default:null" json:"userID"` // 创建者 CreatedAt time.Time `gorm:"column:created_at;type:timestamp;default:CURRENT_TIMESTAMP" json:"createdAt"` // 创建时间 UpdatedAt time.Time `gorm:"column:updated_at;type:timestamp;default:null;onUpdate:CURRENT_TIMESTAMP" json:"updatedAt"` // 更新时间 DeletedAt time.Time `gorm:"column:deleted_at;type:timestamp;default:null" json:"-"` // 删除时间 } type AppInstance struct { ID int64 `json:"id"` // 实例ID Name string `json:"name"` // 实例名称 Description string `json:"description"` // 实例描述 Content AppInfo `json:"content"` // 实例内容 AppID int64 `json:"appID,string"` // 关联应用ID AppName string `json:"appName"` // 应用名称 UserID cdssdk.UserID `json:"userID"` // 创建者 CreatedAt time.Time `json:"createdAt"` // 创建时间 UpdatedAt time.Time `json:"updatedAt"` // 更新时间 DeletedAt time.Time `json:"-"` // 删除时间 } type AppRunRecordDao struct { ID int64 `gorm:"primaryKey;autoIncrement;column:id" json:"id"` // 运行记录ID AppInstanceID DataID `gorm:"column:app_instance_id;type:bigint;not null" json:"appInstanceID"` // 关联应用实例ID Content string `gorm:"column:content;type:text;default:null" json:"content"` // 运行内容 Status string `gorm:"column:status;type:varchar(100);not null" json:"status"` // 运行状态 RunLog string `gorm:"column:run_log;type:text;default:null" json:"runLog"` // 运行日志 RunID JobSetID ` gorm:"column:run_id;type:varchar(100);default:null" json:"runID"` // 运行ID RunOutput string `gorm:"column:run_output;type:text;default:null" json:"runOutput"` // 运行输出 UserID cdssdk.UserID `gorm:"column:user_id;type:bigint;default:null" json:"userID"` // 创建者 CreatedAt time.Time `gorm:"column:created_at;type:timestamp;default:CURRENT_TIMESTAMP" json:"createdAt"` // 创建时间 UpdatedAt time.Time `gorm:"column:updated_at;type:timestamp;default:null;onUpdate:CURRENT_TIMESTAMP" json:"updatedAt"` // 更新时间 DeletedAt time.Time `gorm:"column:deleted_at;type:timestamp;default:null" json:"-"` // 删除时间 } type AppRunRecord struct { ID int64 `gorm:"primaryKey;autoIncrement;column:id" json:"id"` // 运行记录ID AppInstanceID DataID `gorm:"column:app_instance_id;type:bigint;not null" json:"appInstanceID"` // 关联应用实例ID Content AppInfo `gorm:"column:content;type:text;default:null" json:"content"` // 运行内容 Status string `gorm:"column:status;type:varchar(100);not null" json:"status"` // 运行状态 RunLog string `gorm:"column:run_log;type:text;default:null" json:"runLog"` // 运行日志 RunID JobSetID ` gorm:"column:run_id;type:varchar(100);default:null" json:"runID"` // 运行ID RunOutput string `gorm:"column:run_output;type:text;default:null" json:"runOutput"` // 运行输出 UserID cdssdk.UserID `gorm:"column:user_id;type:bigint;default:null" json:"userID"` // 创建者 CreatedAt time.Time `gorm:"column:created_at;type:timestamp;default:CURRENT_TIMESTAMP" json:"createdAt"` // 创建时间 UpdatedAt time.Time `gorm:"column:updated_at;type:timestamp;default:null;onUpdate:CURRENT_TIMESTAMP" json:"updatedAt"` // 更新时间 DeletedAt time.Time `gorm:"column:deleted_at;type:timestamp;default:null" json:"-"` // 删除时间 }