mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
27 lines
777 B
Go
27 lines
777 B
Go
package entities
|
|
|
|
import (
|
|
"time"
|
|
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
const (
|
|
EntityTypeProjectFlockKandang = "PROJECT_FLOCK_KANDANG"
|
|
)
|
|
|
|
type StockAvailability struct {
|
|
Id uint `gorm:"primaryKey"`
|
|
EntityType string `gorm:"size:50;not null"`
|
|
EntityId uint `gorm:"not null"`
|
|
ProductId uint `gorm:"not null"`
|
|
Quantity float64 `gorm:"not null;default:0"`
|
|
ReservedQuantity float64 `gorm:"not null;default:0"`
|
|
Unit string `gorm:"size:20"`
|
|
LastUpdated time.Time `gorm:"autoUpdateTime"`
|
|
CreatedAt time.Time `gorm:"autoCreateTime"`
|
|
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
|
|
|
|
Product *Product `gorm:"foreignKey:ProductId;references:Id"`
|
|
}
|