feat: colum stock in product

This commit is contained in:
fernanda-one
2024-08-24 00:37:43 +07:00
parent b7799b7ada
commit 56f7baf21d
3 changed files with 5 additions and 0 deletions
+2
View File
@@ -21,6 +21,7 @@ type Product struct {
DeletedAt *time.Time `gorm:"column:deleted_at"`
CreatedBy int64 `gorm:"type:int;column:created_by"`
UpdatedBy int64 `gorm:"type:int;column:updated_by"`
Stock int64 `gorm:"type:int;column:stock"`
}
func (Product) TableName() string {
@@ -75,6 +76,7 @@ func (e *ProductDB) ToProduct() *Product {
SiteID: e.SiteID,
IsSeasonTicket: e.IsSeasonTicket,
IsWeekendTicket: e.IsWeekendTicket,
Stock: e.Stock,
}
}