26 lines
905 B
Go
26 lines
905 B
Go
package entities
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
type Ingredient struct {
|
|
ID uuid.UUID `json:"id" db:"id"`
|
|
OrganizationID uuid.UUID `json:"organization_id" db:"organization_id"`
|
|
OutletID *uuid.UUID `json:"outlet_id" db:"outlet_id"`
|
|
Name string `json:"name" db:"name"`
|
|
UnitID uuid.UUID `json:"unit_id" db:"unit_id"`
|
|
Cost float64 `json:"cost" db:"cost"`
|
|
Stock float64 `json:"stock" db:"stock"`
|
|
IsSemiFinished bool `json:"is_semi_finished" db:"is_semi_finished"`
|
|
IsActive bool `json:"is_active" db:"is_active"`
|
|
Metadata map[string]any `json:"metadata" db:"metadata"`
|
|
CreatedAt time.Time `json:"created_at" db:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
|
|
|
|
// Relations
|
|
Unit *Unit `json:"unit,omitempty"`
|
|
}
|