mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 05:21:57 +00:00
32 lines
1.4 KiB
Go
32 lines
1.4 KiB
Go
package entities
|
|
|
|
import (
|
|
"time"
|
|
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
type LayingTransfer struct {
|
|
Id uint `gorm:"primaryKey"`
|
|
TransferNumber string `gorm:"uniqueIndex;not null"`
|
|
FromProjectFlockId uint `gorm:"not null"`
|
|
ToProjectFlockId uint `gorm:"not null"`
|
|
TransferDate time.Time `gorm:"type:date;not null"`
|
|
EffectiveMoveDate *time.Time `gorm:"type:date"`
|
|
ExecutedAt *time.Time `gorm:"type:timestamptz"`
|
|
ExecutedBy *uint `gorm:"index"`
|
|
Notes string `gorm:"type:text"`
|
|
CreatedBy uint `gorm:"not null"`
|
|
CreatedAt time.Time `gorm:"autoCreateTime"`
|
|
UpdatedAt time.Time `gorm:"autoUpdateTime"`
|
|
DeletedAt gorm.DeletedAt `gorm:"index"`
|
|
|
|
FromProjectFlock *ProjectFlock `gorm:"foreignKey:FromProjectFlockId;references:Id"`
|
|
ToProjectFlock *ProjectFlock `gorm:"foreignKey:ToProjectFlockId;references:Id"`
|
|
CreatedUser *User `gorm:"foreignKey:CreatedBy;references:Id"`
|
|
ExecutedUser *User `gorm:"foreignKey:ExecutedBy;references:Id"`
|
|
Sources []LayingTransferSource `gorm:"foreignKey:LayingTransferId;constraint:OnDelete:CASCADE"`
|
|
Targets []LayingTransferTarget `gorm:"foreignKey:LayingTransferId;constraint:OnDelete:CASCADE"`
|
|
LatestApproval *Approval `gorm:"-" json:"-"`
|
|
}
|