model

package
v0.0.0-...-d3ac071 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StNormal = iota
	StWorking
	StStop
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Experiment

type Experiment struct {
	ID            uint      `gorm:"Column:id;PRIMARY_KEY"`
	Name          string    `gorm:"Column:name;UNIQUE_INDEX:uniq_name;NOT NULL;Size:150"`
	UniqKey       string    `gorm:"Column:uniq_key;UNIQUE_INDEX:uniq_key;NOT NULL;Size:40"`
	LayerID       uint      `gorm:"Column:layer_id;NOT NULL;default:0;Index:idx_layer_id"`
	LayerUsed     uint      `gorm:"Column:layer_used;NOT NULL;default:0"`
	Groups        string    `gorm:"Column:groups;Type:longtext"`
	CurrentStatus uint      `gorm:"Column:current_status;NOT NULL;DEFAULT:0"`
	BeginTime     time.Time `gorm:"Column:begin_time"`
	EndTime       time.Time `gorm:"Column:end_time"`
	CreatedAt     time.Time `gorm:"Column:created_at"`
	UpdatedAt     time.Time `gorm:"Column:updated_at"`
}

Experiment struct

func (*Experiment) Index

func (e *Experiment) Index() []Experiment

Index find all elements.

func (*Experiment) TableName

func (e *Experiment) TableName() string

TableName db table name

type Layer

type Layer struct {
	ID        uint      `gorm:"Column:id;PRIMARY_KEY"`
	Name      string    `gorm:"Column:name;NOT NULL;UNIQUE_INDEX:uniq_name;Size:150"`
	Left      uint      `gorm:"Column:left;NOT NULL;DEFAULT:0"`
	CreatedAt time.Time `gorm:"Column:created_at"`
	UpdatedAt time.Time `gorm:"Column:updated_at"`
}

Layer struct

func (*Layer) TableName

func (l *Layer) TableName() string

TableName db table name

Jump to

Keyboard shortcuts

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