mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 21:41:55 +00:00
25 lines
855 B
Go
25 lines
855 B
Go
package entities
|
|
|
|
import (
|
|
"time"
|
|
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
const ()
|
|
|
|
type ProjectChickin struct {
|
|
Id uint `gorm:"primaryKey"`
|
|
ProjectFlockKandangId uint `gorm:"not null;index;constraint:OnUpdate:CASCADE,OnDelete:CASCADE"`
|
|
ChickInDate time.Time `gorm:"not null"`
|
|
Quantity float64 `gorm:"not null"`
|
|
Note string `gorm:"type:text"`
|
|
CreatedBy uint `gorm:"not null"`
|
|
CreatedAt time.Time `gorm:"autoCreateTime"`
|
|
UpdatedAt time.Time `gorm:"autoUpdateTime"`
|
|
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
|
|
|
|
ProjectFlockKandang ProjectFlockKandang `gorm:"foreignKey:ProjectFlockKandangId;references:Id"`
|
|
CreatedUser User `gorm:"foreignKey:CreatedBy;references:Id"`
|
|
}
|