31 lines
553 B
Go
31 lines
553 B
Go
package control_case
|
|
|
|
import (
|
|
"github.com/che4web/go4rest"
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
type ControlCaseController struct {
|
|
*go4rest.ViewSet[ControlCase]
|
|
db *gorm.DB
|
|
}
|
|
|
|
func NewControlCaseController(db *gorm.DB) *ControlCaseController {
|
|
return &ControlCaseController{
|
|
ViewSet: go4rest.NewViewSet[ControlCase](db),
|
|
db: db,
|
|
}
|
|
}
|
|
|
|
type ParamsController struct {
|
|
*go4rest.ViewSet[Params]
|
|
db *gorm.DB
|
|
}
|
|
|
|
func NewParamsController(db *gorm.DB) *ParamsController {
|
|
return &ParamsController{
|
|
ViewSet: go4rest.NewViewSet[Params](db),
|
|
db: db,
|
|
}
|
|
}
|