sql

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSubmissionReadModel

func NewSubmissionReadModel(ctx context.Context, db *gorm.DB) (query.ReadModel, error)

NewSubmissionReadModel ...

func NewSubmissionRepository

func NewSubmissionRepository(ctx context.Context, db *gorm.DB) (submission.Repository, error)

NewSubmissionRepository ...

func SubmissionPOToSubmissionDO

func SubmissionPOToSubmissionDO(ctx context.Context, sb *Submission) (*submission.Submission, error)

func SubmissionPOToSubmissionDTO

func SubmissionPOToSubmissionDTO(ctx context.Context, submission *Submission) (*query.SubmissionItem, error)

Types

type ExposedOptions

type ExposedOptions struct {
	ReadFromCache bool `json:"readFromCache"`
}

type Submission

type Submission struct {
	ID                string
	WorkspaceID       string                 `gorm:"type:varchar(32);not null;uniqueIndex:sub_ws"`
	Name              string                 `gorm:"type:varchar(410) CHARACTER SET gbk COLLATE gbk_bin;not null;uniqueIndex:sub_ws"`
	Description       *string                `gorm:"type:text"`
	WorkflowID        string                 `gorm:"type:varchar(32);not null"`
	WorkflowVersionID string                 `gorm:"type:varchar(32);not null"`
	DataModelID       *string                `gorm:"type:varchar(32)"`
	DataModelRowIDs   *string                `gorm:"type:text"`
	Type              string                 `gorm:"type:varchar(32);not null"`
	Inputs            map[string]interface{} `gorm:"serializer:json"`
	Outputs           map[string]interface{} `gorm:"serializer:json"`
	ExposedOptions    ExposedOptions         `gorm:"serializer:json"`
	Status            string                 `gorm:"type:varchar(32);not null"`
	StartTime         time.Time              `gorm:"not null"`
	FinishTime        *time.Time
	UserID            *int64
}

func SubmissionDOToSubmissionPO

func SubmissionDOToSubmissionPO(ctx context.Context, sb *submission.Submission) (*Submission, error)

func (*Submission) TableName

func (s *Submission) TableName() string

type SubmissionModel

type SubmissionModel struct {
	Submission
	// '软删除标识, 空表示未删除,非空值为删除时间',
	DeletedAt gorm.DeletedAt
}

func (*SubmissionModel) TableName

func (s *SubmissionModel) TableName() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL