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,9 @@
|
||||
package harvest
|
||||
|
||||
import base "wagfarm-api/log/seeding"
|
||||
|
||||
type HarvestLog struct {
|
||||
base.FieldWorkLog
|
||||
Product asset.Product `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;not null"`
|
||||
Amount float64 `gorm:"not null"` // in units of the product
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package harvest
|
||||
|
||||
import (
|
||||
"wagfarm-api/generic"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func RegisterRoutes(rg *gin.RouterGroup) {
|
||||
generic.RegisterCRUDRoutes(rg.Group("/harvest"), generic.DefaultCRUDController[HarvestLog]())
|
||||
}
|
||||
Reference in new issue
Block a user