Files
futur-web-app/server/internal/models/nutrient_category.go
2025-11-03 12:24:01 +02:00

14 lines
418 B
Go

package models
func (NutrientCategory) TableName() string {
return "nutrient_categories"
}
type NutrientCategory struct {
BaseModel
CategoryID ULID `json:"categoryId" db:"category_id"`
NutrientID ULID `json:"nutrientId" db:"nutrient_id"`
Category Category `json:"category" db:"category" gorm:"foreignKey:CategoryID"`
Nutrient Nutrient `json:"nutrient" db:"nutrient" gorm:"foreignKey:NutrientID"`
}