23 lines
717 B
Go
23 lines
717 B
Go
|
|
package entities
|
||
|
|
|
||
|
|
import (
|
||
|
|
"time"
|
||
|
|
|
||
|
|
"github.com/google/uuid"
|
||
|
|
)
|
||
|
|
|
||
|
|
type ProductIngredient 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"`
|
||
|
|
ProductID uuid.UUID `json:"product_id" db:"product_id"`
|
||
|
|
IngredientID uuid.UUID `json:"ingredient_id" db:"ingredient_id"`
|
||
|
|
Quantity float64 `json:"quantity" db:"quantity"`
|
||
|
|
CreatedAt time.Time `json:"created_at" db:"created_at"`
|
||
|
|
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
|
||
|
|
|
||
|
|
// Relations
|
||
|
|
Product *Product `json:"product,omitempty"`
|
||
|
|
Ingredient *Ingredient `json:"ingredient,omitempty"`
|
||
|
|
}
|