32 lines
1.8 KiB
Go
32 lines
1.8 KiB
Go
package model
|
|
|
|
import (
|
|
"time"
|
|
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
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:''"`
|
|
DeletedAt gorm.DeletedAt `gorm:"index"`
|
|
CreatedAt time.Time `json:"createdAt" gorm:"autoCreateTime"`
|
|
UpdatedAt time.Time `json:"updatedAt" gorm:"autoUpdateTime"`
|
|
}
|