wip: alpha
This commit is contained in:
18
pkg/model/pipe.go
Normal file
18
pkg/model/pipe.go
Normal file
@ -0,0 +1,18 @@
|
||||
package model
|
||||
|
||||
type PipeType string
|
||||
|
||||
const (
|
||||
PipeTypeSrc PipeType = "src"
|
||||
PipeTypeDst PipeType = "dst"
|
||||
PipeTypeMid PipeType = "mid"
|
||||
)
|
||||
|
||||
type Pipe struct {
|
||||
Id uint64 `json:"id" gorm:"primaryKey;column:id"`
|
||||
CreatedAt int64 `json:"created_at" gorm:"column:created_at;autoCreateTime:milli"`
|
||||
UpdatedAt int64 `json:"updated_at" gorm:"column:updated_at;autoUpdateTime:milli"`
|
||||
DeletedAt int64 `json:"deleted_at" gorm:"index;column:deleted_at;default:0"`
|
||||
Name string `json:"name" gorm:"column:name"`
|
||||
Type PipeType `json:"type" gorm:"column:type;type:varchar(16)"`
|
||||
}
|
11
pkg/model/task.go
Normal file
11
pkg/model/task.go
Normal file
@ -0,0 +1,11 @@
|
||||
package model
|
||||
|
||||
type Task struct {
|
||||
Id uint64 `json:"id" gorm:"primaryKey;column:id"`
|
||||
CreatedAt int64 `json:"created_at" gorm:"column:created_at;autoCreateTime:milli"`
|
||||
UpdatedAt int64 `json:"updated_at" gorm:"column:updated_at;autoUpdateTime:milli"`
|
||||
DeletedAt int64 `json:"deleted_at" gorm:"index;column:deleted_at;default:0"`
|
||||
Name string `json:"name" gorm:"column:name"`
|
||||
Description string `json:"description" gorm:"column:description"`
|
||||
Pipes []*Pipe `json:"pipes" gorm:"-"`
|
||||
}
|
Reference in New Issue
Block a user