heritage-api/model/task-model.go

33 lines
1.5 KiB
Go

package model
import "time"
type Task struct {
ID string `json:"id" gorm:"type:varchar(32);primaryKey"`
Name string `json:"name" gorm:"type:varchar(128);default:''"`
OrgID string `json:"orgId" gorm:"type:varchar(32);index"`
ProjectID string `json:"projectId" gorm:"type:varchar(32);index"`
ObjectIDs string `json:"objectIds" gorm:"type:text;not null"`
TypeCode string `json:"typeCode" gorm:"type:varchar(64);not null;index"`
IndicatorIDs string `json:"indicatorIds" gorm:"type:text;not null"`
PackageIDs string `json:"packageIds" gorm:"type:text;not null"`
ExecutorPersonID string `json:"executorPersonId" gorm:"type:varchar(32);not null;index"`
ConfirmerPersonID string `json:"confirmerPersonId" gorm:"type:varchar(32);not null;index"`
StartAt time.Time `json:"startAt" gorm:"index"`
EndAt time.Time `json:"endAt" gorm:"index"`
ExecutedAt *time.Time `json:"executedAt"`
SinglePoint bool `json:"singlePoint" gorm:"not null;default:false"`
PeriodicType int `json:"periodicType" gorm:"not null;default:0;index"`
PeriodDays int `json:"periodDays" gorm:"not null;default:0"`
StatusCode string `json:"statusCode" gorm:"type:varchar(64);not null;index"`
Remark string `json:"remark" gorm:"type:varchar(255);default:''"`
Deleted bool `json:"deleted" gorm:"not null;default:false;index"`
CreatedAt time.Time `json:"createdAt" gorm:"autoCreateTime"`
UpdatedAt time.Time `json:"updatedAt" gorm:"autoUpdateTime"`
}