plugai_updsrv/pkg/dal/models/deploy_do.go

53 lines
3.2 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package models
import "time"
const TableNameDeploy = "deploy" //登录记录表
const (
DEPLOY_COLUMN_ID = "id"
DEPLOY_COLUMN_NID = "n_id"
DEPLOY_COLUMN_MB_UUID = "mb_uuid"
DEPLOY_COLUMN_REPO_NAME = "repo_name"
DEPLOY_COLUMN_DIGEST = "digest"
DEPLOY_COLUMN_TYPE = "type"
DEPLOY_COLUMN_STATUS = "status"
DEPLOY_COLUMN_USERNAME = "user_name"
DEPLOY_COLUMN_CREATED_TIME = "created_time"
DEPLOY_COLUMN_UPDATED_TIME = "updated_time"
)
type DeployDO struct {
Id int32 `json:"id" db:"id" bson:"_id"` //自增ID
Nid int32 `json:"n_id" db:"n_id" bson:"n_id"` //对应news表的自增id
MbUuid string `json:"mb_uuid" db:"mb_uuid" bson:"mb_uuid"` //服务器主板uuid
RepoName string `json:"repo_name" db:"repo_name" bson:"repo_name"` //对应docker build时的映像名称即repository name
Digest string `json:"digest" db:"digest" bson:"diget"` //对应docker映像文件的OCI hash值
Type int32 `json:"type" db:"type" bson:"type"` //1->模型,2->应用,4->保留,8->保留,16->保留32->保留64->保留,128->保留
Status string `json:"status" db:"status" bson:"status"` //模型在系统中所处的状态running,stopped,removed,deploying
UserName string `json:"user_name" db:"user_name" bson:"user_name"` //执行部署这个模型的用户名
CreatedTime time.Time `json:"created_time" db:"created_time" sqlca:"readonly" bson:"created_time"` //创建时间
UpdatedTime time.Time `json:"updated_time" db:"updated_time" sqlca:"readonly" bson:"updated_time"` //更新时间
}
func (do *DeployDO) GetId() int32 { return do.Id }
func (do *DeployDO) SetId(v int32) { do.Id = v }
func (do *DeployDO) GetNid() int32 { return do.Nid }
func (do *DeployDO) SetNid(v int32) { do.Nid = v }
func (do *DeployDO) GetMbUuid() string { return do.MbUuid }
func (do *DeployDO) SetMbUuid(v string) { do.MbUuid = v }
func (do *DeployDO) GetRepoName() string { return do.RepoName }
func (do *DeployDO) SetRepoName(v string) { do.RepoName = v }
func (do *DeployDO) GetDigest() string { return do.Digest }
func (do *DeployDO) SetDigest(v string) { do.Digest = v }
func (do *DeployDO) GetType() int32 { return do.Type }
func (do *DeployDO) SetType(v int32) { do.Type = v }
func (do *DeployDO) GetStatus() string { return do.Status }
func (do *DeployDO) SetStatus(v string) { do.Status = v }
func (do *DeployDO) GetUserName() string { return do.UserName }
func (do *DeployDO) SetUserName(v string) { do.UserName = v }
func (do *DeployDO) GetCreatedTime() time.Time { return do.CreatedTime }
func (do *DeployDO) SetCreatedTime(v time.Time) { do.CreatedTime = v }
func (do *DeployDO) GetUpdatedTime() time.Time { return do.UpdatedTime }
func (do *DeployDO) SetUpdatedTime(v time.Time) { do.UpdatedTime = v }