yjp 1 anno fa
parent
commit
5ca11658db

+ 5 - 5
convenient/domain/configuration/api.go

@@ -4,7 +4,7 @@ import (
 	"git.sxidc.com/go-framework/baize/convenient/binding"
 	"git.sxidc.com/go-framework/baize/convenient/binding/request"
 	"git.sxidc.com/go-framework/baize/convenient/binding/response"
-	"git.sxidc.com/go-framework/baize/convenient/value_object"
+	"git.sxidc.com/go-framework/baize/convenient/value_object_crud"
 	"git.sxidc.com/go-framework/baize/framwork/api"
 	"git.sxidc.com/go-framework/baize/framwork/domain"
 	"git.sxidc.com/go-framework/baize/framwork/infrastructure"
@@ -27,17 +27,17 @@ func (simple *Simple) bind(binder *binding.Binder) {
 	options := simple.options
 
 	configurationTableName := domain.TableName(simple.Schema, &Entity{})
-	valueObjectOptions := []value_object.Option[any]{value_object.WithDisableQuery[any]()}
+	valueObjectOptions := []value_object_crud.Option[any]{value_object_crud.WithDisableQuery[any]()}
 
 	if options.disableCreate {
-		valueObjectOptions = append(valueObjectOptions, value_object.WithDisableCreate[any]())
+		valueObjectOptions = append(valueObjectOptions, value_object_crud.WithDisableCreate[any]())
 	}
 
 	if options.disableDelete {
-		valueObjectOptions = append(valueObjectOptions, value_object.WithDisableDelete[any]())
+		valueObjectOptions = append(valueObjectOptions, value_object_crud.WithDisableDelete[any]())
 	}
 
-	value_object.BindSimple(binder, &value_object.Simple[any]{
+	value_object_crud.BindSimple(binder, &value_object_crud.Simple[any]{
 		ValueObject:    &Entity{},
 		Schema:         simple.Schema,
 		CreateJsonBody: &AddConfigurationJsonBody{},

+ 1 - 1
convenient/entity/service.go → convenient/entity_crud/service.go

@@ -1,4 +1,4 @@
-package entity
+package entity_crud
 
 import (
 	"git.sxidc.com/go-framework/baize/convenient/binding"

+ 1 - 1
convenient/entity/service_callbacks.go → convenient/entity_crud/service_callbacks.go

@@ -1,4 +1,4 @@
-package entity
+package entity_crud
 
 import (
 	"git.sxidc.com/go-framework/baize/framwork/domain/entity"

+ 1 - 1
convenient/entity/simple.go → convenient/entity_crud/simple.go

@@ -1,4 +1,4 @@
-package entity
+package entity_crud
 
 import (
 	"git.sxidc.com/go-framework/baize/convenient/binding"

+ 1 - 1
convenient/value_object/service.go → convenient/value_object_crud/service.go

@@ -1,4 +1,4 @@
-package value_object
+package value_object_crud
 
 import (
 	"git.sxidc.com/go-framework/baize/convenient/binding"

+ 1 - 1
convenient/value_object/service_callbacks.go → convenient/value_object_crud/service_callbacks.go

@@ -1,4 +1,4 @@
-package value_object
+package value_object_crud
 
 import (
 	"git.sxidc.com/go-framework/baize/framwork/domain/value_object"

+ 1 - 1
convenient/value_object/simple.go → convenient/value_object_crud/simple.go

@@ -1,4 +1,4 @@
-package value_object
+package value_object_crud
 
 import (
 	"git.sxidc.com/go-framework/baize/convenient/binding"

+ 2 - 2
examples/examples/project/application/service/class.go

@@ -1,7 +1,7 @@
 package service
 
 import (
-	"git.sxidc.com/go-framework/baize/convenient/entity"
+	"git.sxidc.com/go-framework/baize/convenient/entity_crud"
 	"git.sxidc.com/go-framework/baize/examples/examples/project/application/domain/class"
 	"git.sxidc.com/go-framework/baize/framwork/application"
 )
@@ -20,7 +20,7 @@ func (svc *ClassService) Destroy() error {
 func (svc *ClassService) v1(appInstance *application.App) {
 	v1Binder := appInstance.Binder(application.RouterPrefix, "v1")
 
-	entity.BindSimple[class.Info](v1Binder, &entity.Simple[class.Info]{
+	entity_crud.BindSimple[class.Info](v1Binder, &entity_crud.Simple[class.Info]{
 		Entity:             &class.Entity{},
 		Schema:             dbSchema,
 		CreateJsonBody:     &class.CreateJsonBody{},

+ 2 - 2
examples/examples/project/application/service/family.go

@@ -1,7 +1,7 @@
 package service
 
 import (
-	"git.sxidc.com/go-framework/baize/convenient/entity"
+	"git.sxidc.com/go-framework/baize/convenient/entity_crud"
 	"git.sxidc.com/go-framework/baize/examples/examples/project/application/domain/family"
 	"git.sxidc.com/go-framework/baize/framwork/application"
 )
@@ -20,7 +20,7 @@ func (svc *FamilyService) Destroy() error {
 func (svc *FamilyService) v1(appInstance *application.App) {
 	v1Binder := appInstance.Binder(application.RouterPrefix, "v1")
 
-	entity.BindSimple[family.Info](v1Binder, &entity.Simple[family.Info]{
+	entity_crud.BindSimple[family.Info](v1Binder, &entity_crud.Simple[family.Info]{
 		Entity:             &family.Entity{},
 		Schema:             dbSchema,
 		CreateJsonBody:     &family.CreateJsonBody{},

+ 2 - 2
examples/examples/project/application/service/identity.go

@@ -1,7 +1,7 @@
 package service
 
 import (
-	"git.sxidc.com/go-framework/baize/convenient/entity"
+	"git.sxidc.com/go-framework/baize/convenient/entity_crud"
 	"git.sxidc.com/go-framework/baize/examples/examples/project/application/domain/identity"
 	"git.sxidc.com/go-framework/baize/framwork/application"
 )
@@ -20,7 +20,7 @@ func (svc *IdentityService) Destroy() error {
 func (svc *IdentityService) v1(appInstance *application.App) {
 	v1Binder := appInstance.Binder(application.RouterPrefix, "v1")
 
-	entity.BindSimple[identity.Info](v1Binder, &entity.Simple[identity.Info]{
+	entity_crud.BindSimple[identity.Info](v1Binder, &entity_crud.Simple[identity.Info]{
 		Entity:             &identity.Entity{},
 		Schema:             dbSchema,
 		CreateJsonBody:     &identity.CreateJsonBody{},

+ 2 - 2
examples/examples/project/application/service/student.go

@@ -1,7 +1,7 @@
 package service
 
 import (
-	"git.sxidc.com/go-framework/baize/convenient/entity"
+	"git.sxidc.com/go-framework/baize/convenient/entity_crud"
 	"git.sxidc.com/go-framework/baize/examples/examples/project/application/domain/student"
 	"git.sxidc.com/go-framework/baize/framwork/application"
 )
@@ -20,7 +20,7 @@ func (svc *StudentService) Destroy() error {
 func (svc *StudentService) v1(appInstance *application.App) {
 	v1Binder := appInstance.Binder(application.RouterPrefix, "v1")
 
-	entity.BindSimple[student.Info](v1Binder, &entity.Simple[student.Info]{
+	entity_crud.BindSimple[student.Info](v1Binder, &entity_crud.Simple[student.Info]{
 		Entity:             &student.Entity{},
 		Schema:             dbSchema,
 		CreateJsonBody:     &student.CreateJsonBody{},