16 lines
382 B
Go
16 lines
382 B
Go
package product
|
|
|
|
import (
|
|
"wagfarm-api/assets/base"
|
|
"wagfarm-api/database"
|
|
"wagfarm-api/taxonomy/producttype"
|
|
)
|
|
|
|
type Product struct {
|
|
base.SoldResource
|
|
ProductTypeID uint `gorm:"not null"`
|
|
ProductType producttype.ProductType `gorm:"not null; constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
|
|
}
|
|
|
|
func RegisterModels() { database.RegisterModel(&Product{}) }
|