package cloud

import (
	"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/models/base"
	"time"
)

type TaskCloudModel struct {
	Id          int64      `json:"id" gorm:"primarykey;not null;comment:id"`
	Name        string     `json:"name" gorm:"null;comment:名称"`
	TaskId      int64      `json:"taskId" gorm:"not null;comment:task表id"`
	AdapterId   int64      `json:"adapterId" gorm:"not null;comment:适配器id"`
	AdapterName string     `json:"adapterName" gorm:"not null;comment:适配器名称"`
	ClusterId   uint       `json:"clusterId" gorm:"not null;comment:集群id"`
	ClusterName string     `json:"clusterName" gorm:"not null;comment:集群名称"`
	Kind        string     `json:"kind" gorm:"comment:种类"`
	Status      string     `json:"status" gorm:"comment:状态"`
	StartTime   *time.Time `json:"startTime,string" gorm:"comment:开始时间"`
	YamlString  string     `json:"yamlString" gorm:"not null;comment:入参"`
	Result      string     `json:"result" gorm:"comment:运行结果"`
	Namespace   string     `json:"namespace" gorm:"comment:命名空间"`
	UserId      int64      `json:"userId" gorm:"comment:用户id"`
	base.BaseModel
}

func (TaskCloudModel) TableName() string {
	return "task_cloud"
}
