14 lines
418 B
Go
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"`
|
|
}
|