model

package
v0.0.0-...-ede9753 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact struct {
	ID         string `gorm:"primaryKey"`
	ProjectID  string `gorm:"column:project_id;not null;index" sql:"type:uuid"`
	ArtifactID string `gorm:"column:artifact_id;not null;index"`
	Size       int    `gorm:"column:size;not null"`

	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt *time.Time `sql:"index"`
}

func (Artifact) TableName

func (Artifact) TableName() string

type Project

type Project struct {
	ID string `gorm:"primaryKey;" sql:"type:uuid;"`

	Name        string      `gorm:"column:name;not null"`
	Description string      `gorm:"column:description;not null"`
	Artifacts   []*Artifact `gorm:"foreignKey:ProjectID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE"`

	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt *time.Time `sql:"index"`
}

func (Project) TableName

func (Project) TableName() string

Jump to

Keyboard shortcuts

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