final project structure
This commit is contained in:
1 parent
d6b3e88b5f
commit
284a40fac2
65 files changed
+668
-447
No files matched your search
@@ -0,0 +1,12 @@
|
||||
package ingredient
|
||||
|
||||
import (
|
||||
"wagfarm-api/taxonomy/base"
|
||||
"wagfarm-api/taxonomy/unit"
|
||||
)
|
||||
|
||||
type Ingredient struct {
|
||||
base.Taxonomy
|
||||
UnitID uint `gorm:"not null"`
|
||||
Unit unit.Unit `gorm:"not null"`
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package ingredient
|
||||
|
||||
import (
|
||||
"wagfarm-api/generic"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func RegisterRoutes(rg *gin.RouterGroup) {
|
||||
generic.RegisterCRUDRoutes(rg.Group("/ingredient"), generic.DefaultCRUDController[Ingredient]())
|
||||
}
|
||||
Reference in new issue
Block a user