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,11 @@
|
||||
package seed
|
||||
|
||||
import (
|
||||
"wagfarm-api/asset/base"
|
||||
)
|
||||
|
||||
type Seed struct {
|
||||
base.BoughtResource
|
||||
SeedTypeID uint `gorm:"not null"`
|
||||
SeedType SeedType `gorm:"not null; constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package seed
|
||||
|
||||
import (
|
||||
"wagfarm-api/generic"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func RegisterRoutes(rg *gin.RouterGroup) {
|
||||
generic.RegisterCRUDRoutes(rg.Group("/seed"), generic.DefaultCRUDController[Seed]())
|
||||
}
|
||||
Reference in new issue
Block a user