heritage-api/model/project-model.go

33 lines
1.6 KiB
Go

package model
import "time"
type Project struct {
ID string `json:"id" gorm:"type:varchar(32);primaryKey"`
ProjectNo string `json:"projectNo" gorm:"type:varchar(32);not null;uniqueIndex"`
Name string `json:"name" gorm:"type:varchar(100);not null"`
TypeCode string `json:"typeCode" gorm:"type:varchar(64);not null;index"`
BuildingIDs string `json:"buildingIds" gorm:"type:text;not null"`
StatusCode string `json:"statusCode" gorm:"type:varchar(64);not null;index"`
ResponsibleOrgID string `json:"responsibleOrgId" gorm:"type:varchar(32);not null;index"`
ImplementOrgIDs string `json:"implementOrgIds" gorm:"type:text;not null"`
LeaderPersonID string `json:"leaderPersonId" gorm:"type:varchar(32);not null;index"`
ParticipantPersonIDs string `json:"participantPersonIds" gorm:"type:text;not null"`
StartAt time.Time `json:"startAt" gorm:"not null;index"`
EndAt time.Time `json:"endAt" gorm:"not null;index"`
CompletedAt *time.Time `json:"completedAt"`
Description string `json:"description" gorm:"type:text;not null"`
Attachments string `json:"attachments" gorm:"type:text;not null"`
OrgID string `json:"orgId" gorm:"type:varchar(32);not null;index"`
CreatorUserID string `json:"creatorUserId" gorm:"type:varchar(32);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"`
}