feat(BE-116): add project chick in database schema

This commit is contained in:
aguhh18
2025-10-18 16:30:13 +07:00
parent a45c20d2ff
commit 68a670a2bd
13 changed files with 568 additions and 9 deletions
+24
View File
@@ -0,0 +1,24 @@
package entities
import (
"time"
"gorm.io/gorm"
)
type ProjectChickin struct {
Id uint `gorm:"primaryKey"`
ProjectFlocId uint `gorm:"not null"`
ProductWarehouseId uint `gorm:"not null"`
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:"-"`
ProjectFloc ProjectFlock `gorm:"foreignKey:ProjectFlocId;references:Id"`
ProductWarehouse ProductWarehouse `gorm:"foreignKey:ProductWarehouseId;references:Id"`
CreatedUser User `gorm:"foreignKey:CreatedBy;references:Id"`
}