trying around with different routing and controller structures
This commit is contained in:
@@ -1,5 +1,16 @@
|
||||
package models
|
||||
|
||||
var AssetModels = []interface{}{
|
||||
&Land{},
|
||||
&Plant{},
|
||||
&Machine{},
|
||||
&Seed{},
|
||||
&Fertilizer{},
|
||||
&FertilizerIngredient{},
|
||||
&Pesticide{},
|
||||
&Product{},
|
||||
}
|
||||
|
||||
type _Asset struct {
|
||||
ID uint `gorm:"primaryKey`
|
||||
Name string `gorm:"not null"`
|
||||
@@ -1,5 +1,13 @@
|
||||
package models
|
||||
|
||||
var LogModels = []interface{}{
|
||||
&Log{},
|
||||
&SeedingLog{},
|
||||
&FertilizingLog{},
|
||||
&CropProtectionLog{},
|
||||
&HarvestLog{},
|
||||
}
|
||||
|
||||
type Log struct {
|
||||
ID uint `gorm:"primaryKey"`
|
||||
Name string `gorm:"not null"`
|
||||
@@ -1,5 +1,21 @@
|
||||
package models
|
||||
|
||||
var TaxonomyModels = []interface{}{
|
||||
&Unit{},
|
||||
&Visibility{},
|
||||
&SeedingTechnique{},
|
||||
&SeedingCondition{},
|
||||
&Worker{},
|
||||
&Crop{},
|
||||
&Seller{},
|
||||
&Customer{},
|
||||
&SeedType{},
|
||||
&Ingredient{},
|
||||
&FertilizerType{},
|
||||
&PesticideType{},
|
||||
&ProductType{},
|
||||
}
|
||||
|
||||
type _Taxonomy struct {
|
||||
ID uint `gorm:"primaryKey" json:"id"`
|
||||
Name string `gorm:"not null;index" json:"name"` // e.g., "kg", "lb"
|
||||
Reference in New Issue
Block a user