|
@@ -146,7 +146,7 @@ func main() {
|
|
|
DTO: &CreateClassJsonBody{},
|
|
DTO: &CreateClassJsonBody{},
|
|
|
Objects: []domain.Object{&Class{}},
|
|
Objects: []domain.Object{&Class{}},
|
|
|
ServiceFunc: func(c *api.Context, dto binding.DTO, objects []domain.Object, i *infrastructure.Infrastructure) (string, error) {
|
|
ServiceFunc: func(c *api.Context, dto binding.DTO, objects []domain.Object, i *infrastructure.Infrastructure) (string, error) {
|
|
|
- e := domain.ToConcreteObject[*Class](objects[0])
|
|
|
|
|
|
|
+ e := domain.ToConcrete[*Class](objects[0])
|
|
|
e.ID = strutils.SimpleUUID()
|
|
e.ID = strutils.SimpleUUID()
|
|
|
|
|
|
|
|
err := database.InsertEntity(i.DBOperations(), tableName, e)
|
|
err := database.InsertEntity(i.DBOperations(), tableName, e)
|
|
@@ -165,7 +165,7 @@ func main() {
|
|
|
DTO: &DeleteClassPathParams{},
|
|
DTO: &DeleteClassPathParams{},
|
|
|
Objects: []domain.Object{&Class{}},
|
|
Objects: []domain.Object{&Class{}},
|
|
|
ServiceFunc: func(c *api.Context, dto binding.DTO, objects []domain.Object, i *infrastructure.Infrastructure) (any, error) {
|
|
ServiceFunc: func(c *api.Context, dto binding.DTO, objects []domain.Object, i *infrastructure.Infrastructure) (any, error) {
|
|
|
- e := domain.ToConcreteObject[*Class](objects[0])
|
|
|
|
|
|
|
+ e := domain.ToConcrete[*Class](objects[0])
|
|
|
|
|
|
|
|
err := database.DeleteEntity(i.DBOperations(), tableName, e)
|
|
err := database.DeleteEntity(i.DBOperations(), tableName, e)
|
|
|
if err != nil {
|
|
if err != nil {
|
|
@@ -183,7 +183,7 @@ func main() {
|
|
|
DTO: &UpdateClassJsonBody{},
|
|
DTO: &UpdateClassJsonBody{},
|
|
|
Objects: []domain.Object{&Class{}},
|
|
Objects: []domain.Object{&Class{}},
|
|
|
ServiceFunc: func(c *api.Context, dto binding.DTO, objects []domain.Object, i *infrastructure.Infrastructure) (any, error) {
|
|
ServiceFunc: func(c *api.Context, dto binding.DTO, objects []domain.Object, i *infrastructure.Infrastructure) (any, error) {
|
|
|
- e := domain.ToConcreteObject[*Class](objects[0])
|
|
|
|
|
|
|
+ e := domain.ToConcrete[*Class](objects[0])
|
|
|
|
|
|
|
|
result, err := database.QueryOne(i.DBOperations(), &sql.QueryOneExecuteParams{
|
|
result, err := database.QueryOne(i.DBOperations(), &sql.QueryOneExecuteParams{
|
|
|
TableName: tableName,
|
|
TableName: tableName,
|
|
@@ -223,7 +223,7 @@ func main() {
|
|
|
DTO: &QueryClassesQueryParams{},
|
|
DTO: &QueryClassesQueryParams{},
|
|
|
Objects: []domain.Object{&Class{}},
|
|
Objects: []domain.Object{&Class{}},
|
|
|
ServiceFunc: func(c *api.Context, dto binding.DTO, objects []domain.Object, i *infrastructure.Infrastructure) (binding.InfosData[ClassInfo], error) {
|
|
ServiceFunc: func(c *api.Context, dto binding.DTO, objects []domain.Object, i *infrastructure.Infrastructure) (binding.InfosData[ClassInfo], error) {
|
|
|
- e := domain.ToConcreteObject[*Class](objects[0])
|
|
|
|
|
|
|
+ e := domain.ToConcrete[*Class](objects[0])
|
|
|
pageNo := binding.Field[int](dto, "PageNo")
|
|
pageNo := binding.Field[int](dto, "PageNo")
|
|
|
pageSize := binding.Field[int](dto, "PageSize")
|
|
pageSize := binding.Field[int](dto, "PageSize")
|
|
|
|
|
|
|
@@ -268,7 +268,7 @@ func main() {
|
|
|
DTO: &GetClassQueryParams{},
|
|
DTO: &GetClassQueryParams{},
|
|
|
Objects: []domain.Object{&Class{}},
|
|
Objects: []domain.Object{&Class{}},
|
|
|
ServiceFunc: func(c *api.Context, dto binding.DTO, objects []domain.Object, i *infrastructure.Infrastructure) (*ClassInfo, error) {
|
|
ServiceFunc: func(c *api.Context, dto binding.DTO, objects []domain.Object, i *infrastructure.Infrastructure) (*ClassInfo, error) {
|
|
|
- e := domain.ToConcreteObject[*Class](objects[0])
|
|
|
|
|
|
|
+ e := domain.ToConcrete[*Class](objects[0])
|
|
|
|
|
|
|
|
result, err := database.QueryOne(i.DBOperations(), &sql.QueryOneExecuteParams{
|
|
result, err := database.QueryOne(i.DBOperations(), &sql.QueryOneExecuteParams{
|
|
|
TableName: tableName,
|
|
TableName: tableName,
|