| 123456789101112131415161718192021222324252627282930313233 |
- package service
- import (
- "git.sxidc.com/go-framework/baize/convenient/entity"
- "git.sxidc.com/go-framework/baize/examples/examples/project/application/domain/student"
- "git.sxidc.com/go-framework/baize/framwork/application"
- )
- type Student struct{}
- func (app *Student) Init(appInstance *application.App) error {
- app.v1(appInstance)
- return nil
- }
- func (app *Student) Destroy() error {
- return nil
- }
- func (app *Student) v1(appInstance *application.App) {
- v1Binder := appInstance.Binder(application.RouterPrefix, "v1")
- entity.BindSimple[student.Info](v1Binder, &entity.Simple[student.Info]{
- Entity: &student.Entity{},
- TableName: student.TableName,
- DomainPath: "/student",
- CreateJsonBody: &student.CreateJsonBody{},
- DeleteQueryParams: &student.DeletePathParams{},
- UpdateJsonBody: &student.UpdateJsonBody{},
- QueryQueryParams: &student.QueryQueryParams{},
- GetByIDQueryParams: &student.GetByIDQueryParams{},
- })
- }
|