Files
sale/backend/internal/models/inventory.go
T

18 lines
403 B
Go

package models
import (
"time"
)
type Inventory struct {
ID uint `gorm:"primaryKey" json:"id"`
ProductID uint `gorm:"index;not null" json:"product_id"`
SupplierID uint `gorm:"index;not null" json:"supplier_id"`
Quantity int `gorm:"default:0" json:"quantity"`
UpdatedAt time.Time `json:"updated_at"`
}
func (Inventory) TableName() string {
return "inventory"
}