From d007d156f30dfa0f26d98791b6b58049522d9bcc Mon Sep 17 00:00:00 2001 From: canonical Date: Fri, 9 Aug 2024 19:24:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8nop-autotest=E9=87=8D?= =?UTF-8?q?=E6=96=B0=E5=AE=9E=E7=8E=B0DynCodeGen=E7=9A=84=E5=8D=95?= =?UTF-8?q?=E5=85=83=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../codegen/TestDynCodeGenRelation/init.sql | 46 +++++++++++++++++++ .../testManyToManyRelation/autotest.yaml | 0 .../testManyToManyRelation/init/init.sql | 1 + .../testManyToOneRelation/autotest.yaml | 0 .../testManyToOneRelation/init/init.sql | 1 + .../output/tables/nop_dyn_entity_meta.csv | 4 ++ .../tables/nop_dyn_entity_relation_meta.csv | 2 + .../output/tables/nop_dyn_module.csv | 2 + .../output/tables/nop_dyn_prop_meta.csv | 8 ++++ .../output/tables/nop_sys_sequence.csv | 2 + .../testOneToManyRelation/autotest.yaml | 0 .../testOneToManyRelation/init/init.sql | 1 + .../output/tables/nop_dyn_entity_meta.csv | 4 ++ .../tables/nop_dyn_entity_relation_meta.csv | 2 + .../output/tables/nop_dyn_module.csv | 2 + .../output/tables/nop_dyn_prop_meta.csv | 8 ++++ .../output/tables/nop_sys_sequence.csv | 2 + .../testOneToOneRelation/autotest.yaml | 0 .../testOneToOneRelation/init/init.sql | 1 + .../io/nop/dyn/service/codegen/init-db.sql | 0 20 files changed, 86 insertions(+) create mode 100644 nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/init.sql create mode 100644 nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testManyToManyRelation/autotest.yaml create mode 100644 nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testManyToManyRelation/init/init.sql create mode 100644 nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testManyToOneRelation/autotest.yaml create mode 100644 nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testManyToOneRelation/init/init.sql create mode 100644 nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testManyToOneRelation/output/tables/nop_dyn_entity_meta.csv create mode 100644 nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testManyToOneRelation/output/tables/nop_dyn_entity_relation_meta.csv create mode 100644 nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testManyToOneRelation/output/tables/nop_dyn_module.csv create mode 100644 nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testManyToOneRelation/output/tables/nop_dyn_prop_meta.csv create mode 100644 nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testManyToOneRelation/output/tables/nop_sys_sequence.csv create mode 100644 nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testOneToManyRelation/autotest.yaml create mode 100644 nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testOneToManyRelation/init/init.sql create mode 100644 nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testOneToManyRelation/output/tables/nop_dyn_entity_meta.csv create mode 100644 nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testOneToManyRelation/output/tables/nop_dyn_entity_relation_meta.csv create mode 100644 nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testOneToManyRelation/output/tables/nop_dyn_module.csv create mode 100644 nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testOneToManyRelation/output/tables/nop_dyn_prop_meta.csv create mode 100644 nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testOneToManyRelation/output/tables/nop_sys_sequence.csv create mode 100644 nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testOneToOneRelation/autotest.yaml create mode 100644 nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testOneToOneRelation/init/init.sql create mode 100644 nop-dyn/nop-dyn-service/src/test/resources/io/nop/dyn/service/codegen/init-db.sql diff --git a/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/init.sql b/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/init.sql new file mode 100644 index 000000000..7b51b8fe2 --- /dev/null +++ b/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/init.sql @@ -0,0 +1,46 @@ +CREATE TABLE USER_ENTITY( + SID VARCHAR(32) COMMENT '主键ID' , + USER_NAME VARCHAR(100) COMMENT '用户名' , + USER_AGE INTEGER default '1' COMMENT '用户年龄' , + ROLE_ID VARCHAR(200) COMMENT '角色 ID' , + STATUS INTEGER default '1' COMMENT '状态' , + VERSION INTEGER COMMENT '数据版本' , + CREATED_BY VARCHAR(50) COMMENT '创建人' , + CREATE_TIME TIMESTAMP COMMENT '创建时间' , + UPDATED_BY VARCHAR(50) COMMENT '修改人' , + UPDATE_TIME TIMESTAMP COMMENT '修改时间' , + constraint PK_USER_ENTITY_ID primary key (sid) + ); + +INSERT INTO USER_ENTITY (sid, user_name, user_age, role_id, STATUS, VERSION, CREATED_BY, CREATE_TIME, UPDATED_BY, UPDATE_TIME) VALUES ('1', '小明', 1, '123', 1, 1, '小明', '2021-09-01 00:00:00', '小明', '2021-09-01 00:00:00'),('2', '小李', 200, '123', 1, 1, '小李', '2021-09-01 00:00:00', '小李', '2021-09-01 00:00:00'); + +CREATE TABLE ROLE_ENTITY( + SID VARCHAR(32) COMMENT '主键ID' , + ROLE_NAME VARCHAR(100) COMMENT '角色名称' , + ROLE_KEY VARCHAR(100) COMMENT '角色 key' , + STATUS INTEGER default '1' COMMENT '状态' , + VERSION INTEGER COMMENT '数据版本' , + CREATED_BY VARCHAR(50) COMMENT '创建人' , + CREATE_TIME TIMESTAMP COMMENT '创建时间' , + UPDATED_BY VARCHAR(50) COMMENT '修改人' , + UPDATE_TIME TIMESTAMP COMMENT '修改时间' , + constraint PK_ROLE_ENTITY_ID primary key (sid) + ); + +INSERT INTO ROLE_ENTITY (sid, role_name, role_key, STATUS, VERSION, CREATED_BY, CREATE_TIME, UPDATED_BY, UPDATE_TIME) VALUES ('123', '开发角色2', '1', 1, 1, 'development', '2021-09-01 00:00:00', 'development', '2021-09-01 00:00:00'); + +CREATE TABLE USER_MANY_ROLE( + SID VARCHAR(32) COMMENT '主键ID' , + USER_ID VARCHAR(32) COMMENT '用户 ID' , + ROLE_ID VARCHAR(32) COMMENT '角色 ID' , + STATUS INTEGER default '1' COMMENT '状态' , + VERSION INTEGER COMMENT '数据版本' , + CREATED_BY VARCHAR(50) COMMENT '创建人' , + CREATE_TIME TIMESTAMP COMMENT '创建时间' , + UPDATED_BY VARCHAR(50) COMMENT '修改人' , + UPDATE_TIME TIMESTAMP COMMENT '修改时间' , + constraint PK_USER_MANY_ROLE_ID primary key (user_id, role_id) + ); + +INSERT INTO USER_MANY_ROLE (sid, user_id, role_id, STATUS, VERSION, CREATED_BY, CREATE_TIME, UPDATED_BY, UPDATE_TIME) VALUES ('1233123', '1', '123', 1, 1, '小明', '2021-09-01 00:00:00', '小明', '2021-09-01 00:00:00'),('1412414', '255', '123', 1, 1, '小明', '2021-09-01 00:00:00', '小明', '2021-09-01 00:00:00'); + diff --git a/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testManyToManyRelation/autotest.yaml b/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testManyToManyRelation/autotest.yaml new file mode 100644 index 000000000..e69de29bb diff --git a/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testManyToManyRelation/init/init.sql b/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testManyToManyRelation/init/init.sql new file mode 100644 index 000000000..8836d5f33 --- /dev/null +++ b/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testManyToManyRelation/init/init.sql @@ -0,0 +1 @@ +@include: ../../init.sql \ No newline at end of file diff --git a/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testManyToOneRelation/autotest.yaml b/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testManyToOneRelation/autotest.yaml new file mode 100644 index 000000000..e69de29bb diff --git a/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testManyToOneRelation/init/init.sql b/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testManyToOneRelation/init/init.sql new file mode 100644 index 000000000..8836d5f33 --- /dev/null +++ b/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testManyToOneRelation/init/init.sql @@ -0,0 +1 @@ +@include: ../../init.sql \ No newline at end of file diff --git a/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testManyToOneRelation/output/tables/nop_dyn_entity_meta.csv b/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testManyToOneRelation/output/tables/nop_dyn_entity_meta.csv new file mode 100644 index 000000000..fdbb5d1a4 --- /dev/null +++ b/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testManyToOneRelation/output/tables/nop_dyn_entity_meta.csv @@ -0,0 +1,4 @@ +_chgType,ENTITY_META_ID,MODULE_ID,ENTITY_NAME,DISPLAY_NAME,TABLE_NAME,QUERY_SPACE,STORE_TYPE,TAGS_TEXT,IS_EXTERNAL,STATUS,EXT_CONFIG,VERSION,CREATED_BY,CREATE_TIME,UPDATED_BY,UPDATE_TIME,REMARK +A,@var:NopDynEntityMeta@entityMetaId_1,@var:NopDynModule@moduleId,RoleEntity,Role Entity,,,10,,false,1,,0,autotest-ref,*,autotest-ref,*, +A,@var:NopDynEntityMeta@entityMetaId,@var:NopDynModule@moduleId,UserEntity,User Entity,,,10,,false,1,,0,autotest-ref,*,autotest-ref,*, +A,@var:NopDynEntityMeta@entityMetaId_2,@var:NopDynModule@moduleId,UserManyRole,User Many Role,,,10,,false,1,,0,autotest-ref,*,autotest-ref,*, diff --git a/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testManyToOneRelation/output/tables/nop_dyn_entity_relation_meta.csv b/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testManyToOneRelation/output/tables/nop_dyn_entity_relation_meta.csv new file mode 100644 index 000000000..2c81be358 --- /dev/null +++ b/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testManyToOneRelation/output/tables/nop_dyn_entity_relation_meta.csv @@ -0,0 +1,2 @@ +_chgType,REL_META_ID,ENTITY_META_ID,REF_ENTITY_META_ID,RELATION_NAME,RELATION_DISPLAY_NAME,RELATION_TYPE,MIDDLE_TABLE_NAME,MIDDLE_ENTITY_NAME,LEFT_PROP_NAME,RIGHT_PROP_NAME,REF_SET_KEY_PROP,REF_SET_SORT,STATUS,TAGS_TEXT,EXT_CONFIG,VERSION,CREATED_BY,CREATE_TIME,UPDATED_BY,UPDATE_TIME,REMARK +A,@var:NopDynEntityRelationMeta@relMetaId,@var:NopDynEntityMeta@entityMetaId,@var:NopDynEntityMeta@entityMetaId_1,userRole,测试m2o关联,m2o,,,roleId,sid,,,1,pub,,0,autotest-ref,*,autotest-ref,*, diff --git a/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testManyToOneRelation/output/tables/nop_dyn_module.csv b/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testManyToOneRelation/output/tables/nop_dyn_module.csv new file mode 100644 index 000000000..4ce9fc64f --- /dev/null +++ b/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testManyToOneRelation/output/tables/nop_dyn_module.csv @@ -0,0 +1,2 @@ +_chgType,MODULE_ID,MODULE_NAME,MODULE_VERSION,DISPLAY_NAME,BASE_MODULE_ID,BASE_PACKAGE_NAME,ENTITY_PACKAGE_NAME,MAVEN_GROUP_ID,STATUS,VERSION,CREATED_BY,CREATE_TIME,UPDATED_BY,UPDATE_TIME +A,@var:NopDynModule@moduleId,relation-demo,1,Demo Module,,,,,10,0,autotest-ref,*,autotest-ref,* diff --git a/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testManyToOneRelation/output/tables/nop_dyn_prop_meta.csv b/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testManyToOneRelation/output/tables/nop_dyn_prop_meta.csv new file mode 100644 index 000000000..32b2f1b7d --- /dev/null +++ b/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testManyToOneRelation/output/tables/nop_dyn_prop_meta.csv @@ -0,0 +1,8 @@ +_chgType,PROP_META_ID,ENTITY_META_ID,IS_MANDATORY,PROP_NAME,DISPLAY_NAME,STD_SQL_TYPE,PRECISION,SCALE,PROP_ID,UI_SHOW,UI_CONTROL,DOMAIN_ID,STD_DOMAIN_NAME,DICT_NAME,DYN_PROP_MAPPING,TAGS_TEXT,DEFAULT_VALUE,EXT_CONFIG,STATUS,VERSION,CREATED_BY,CREATE_TIME,UPDATED_BY,UPDATE_TIME,REMARK +A,@var:NopDynPropMeta@propMetaId_5,@var:NopDynEntityMeta@entityMetaId_2,true,userId,userId Display,VARCHAR,32,0,1,,,,,,,,,,1,0,autotest-ref,*,autotest-ref,*, +A,@var:NopDynPropMeta@propMetaId_4,@var:NopDynEntityMeta@entityMetaId_1,true,roleKey,roleKey Display,VARCHAR,100,0,1,,,,,,,,,,1,0,autotest-ref,*,autotest-ref,*, +A,@var:NopDynPropMeta@propMetaId_1,@var:NopDynEntityMeta@entityMetaId,true,userAge,userAge Display,INTEGER,0,0,1,,,,,,,,,,1,0,autotest-ref,*,autotest-ref,*, +A,@var:NopDynPropMeta@propMetaId_6,@var:NopDynEntityMeta@entityMetaId_2,true,roleId,roleId Display,VARCHAR,32,0,1,,,,,,,,,,1,0,autotest-ref,*,autotest-ref,*, +A,@var:NopDynPropMeta@propMetaId_2,@var:NopDynEntityMeta@entityMetaId,true,roleId,roleId Display,VARCHAR,100,0,1,,,,,,,,,,1,0,autotest-ref,*,autotest-ref,*, +A,@var:NopDynPropMeta@propMetaId_3,@var:NopDynEntityMeta@entityMetaId_1,true,roleName,roleName Display,VARCHAR,100,0,1,,,,,,,,,,1,0,autotest-ref,*,autotest-ref,*, +A,@var:NopDynPropMeta@propMetaId,@var:NopDynEntityMeta@entityMetaId,true,userName,userName Display,VARCHAR,100,0,1,,,,,,,,,,1,0,autotest-ref,*,autotest-ref,*, diff --git a/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testManyToOneRelation/output/tables/nop_sys_sequence.csv b/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testManyToOneRelation/output/tables/nop_sys_sequence.csv new file mode 100644 index 000000000..ac6b86349 --- /dev/null +++ b/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testManyToOneRelation/output/tables/nop_sys_sequence.csv @@ -0,0 +1,2 @@ +_chgType,SEQ_NAME,SEQ_TYPE,IS_UUID,NEXT_VALUE,STEP_SIZE,CACHE_SIZE,MAX_VALUE,RESET_TYPE,DEL_FLAG,VERSION,CREATED_BY,CREATE_TIME,UPDATED_BY,UPDATE_TIME,REMARK +A,default,seq,0,1,1,100,,,0,0,autotest-ref,*,autotest-ref,*, diff --git a/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testOneToManyRelation/autotest.yaml b/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testOneToManyRelation/autotest.yaml new file mode 100644 index 000000000..e69de29bb diff --git a/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testOneToManyRelation/init/init.sql b/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testOneToManyRelation/init/init.sql new file mode 100644 index 000000000..8836d5f33 --- /dev/null +++ b/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testOneToManyRelation/init/init.sql @@ -0,0 +1 @@ +@include: ../../init.sql \ No newline at end of file diff --git a/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testOneToManyRelation/output/tables/nop_dyn_entity_meta.csv b/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testOneToManyRelation/output/tables/nop_dyn_entity_meta.csv new file mode 100644 index 000000000..0fe935c48 --- /dev/null +++ b/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testOneToManyRelation/output/tables/nop_dyn_entity_meta.csv @@ -0,0 +1,4 @@ +_chgType,ENTITY_META_ID,MODULE_ID,ENTITY_NAME,DISPLAY_NAME,TABLE_NAME,QUERY_SPACE,STORE_TYPE,TAGS_TEXT,IS_EXTERNAL,STATUS,EXT_CONFIG,VERSION,CREATED_BY,CREATE_TIME,UPDATED_BY,UPDATE_TIME,REMARK +A,@var:NopDynEntityMeta@entityMetaId_2,@var:NopDynModule@moduleId,UserManyRole,User Many Role,,,10,,false,1,,0,autotest-ref,*,autotest-ref,*, +A,@var:NopDynEntityMeta@entityMetaId,@var:NopDynModule@moduleId,UserEntity,User Entity,,,10,,false,1,,0,autotest-ref,*,autotest-ref,*, +A,@var:NopDynEntityMeta@entityMetaId_1,@var:NopDynModule@moduleId,RoleEntity,Role Entity,,,10,,false,1,,0,autotest-ref,*,autotest-ref,*, diff --git a/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testOneToManyRelation/output/tables/nop_dyn_entity_relation_meta.csv b/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testOneToManyRelation/output/tables/nop_dyn_entity_relation_meta.csv new file mode 100644 index 000000000..7cd8dc121 --- /dev/null +++ b/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testOneToManyRelation/output/tables/nop_dyn_entity_relation_meta.csv @@ -0,0 +1,2 @@ +_chgType,REL_META_ID,ENTITY_META_ID,REF_ENTITY_META_ID,RELATION_NAME,RELATION_DISPLAY_NAME,RELATION_TYPE,MIDDLE_TABLE_NAME,MIDDLE_ENTITY_NAME,LEFT_PROP_NAME,RIGHT_PROP_NAME,REF_SET_KEY_PROP,REF_SET_SORT,STATUS,TAGS_TEXT,EXT_CONFIG,VERSION,CREATED_BY,CREATE_TIME,UPDATED_BY,UPDATE_TIME,REMARK +A,@var:NopDynEntityRelationMeta@relMetaId,@var:NopDynEntityMeta@entityMetaId_1,@var:NopDynEntityMeta@entityMetaId,roleUsers,测试一对多关联,o2m,,,sid,roleId,,,1,pub,,0,autotest-ref,*,autotest-ref,*, diff --git a/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testOneToManyRelation/output/tables/nop_dyn_module.csv b/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testOneToManyRelation/output/tables/nop_dyn_module.csv new file mode 100644 index 000000000..4ce9fc64f --- /dev/null +++ b/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testOneToManyRelation/output/tables/nop_dyn_module.csv @@ -0,0 +1,2 @@ +_chgType,MODULE_ID,MODULE_NAME,MODULE_VERSION,DISPLAY_NAME,BASE_MODULE_ID,BASE_PACKAGE_NAME,ENTITY_PACKAGE_NAME,MAVEN_GROUP_ID,STATUS,VERSION,CREATED_BY,CREATE_TIME,UPDATED_BY,UPDATE_TIME +A,@var:NopDynModule@moduleId,relation-demo,1,Demo Module,,,,,10,0,autotest-ref,*,autotest-ref,* diff --git a/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testOneToManyRelation/output/tables/nop_dyn_prop_meta.csv b/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testOneToManyRelation/output/tables/nop_dyn_prop_meta.csv new file mode 100644 index 000000000..32d2d8885 --- /dev/null +++ b/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testOneToManyRelation/output/tables/nop_dyn_prop_meta.csv @@ -0,0 +1,8 @@ +_chgType,PROP_META_ID,ENTITY_META_ID,IS_MANDATORY,PROP_NAME,DISPLAY_NAME,STD_SQL_TYPE,PRECISION,SCALE,PROP_ID,UI_SHOW,UI_CONTROL,DOMAIN_ID,STD_DOMAIN_NAME,DICT_NAME,DYN_PROP_MAPPING,TAGS_TEXT,DEFAULT_VALUE,EXT_CONFIG,STATUS,VERSION,CREATED_BY,CREATE_TIME,UPDATED_BY,UPDATE_TIME,REMARK +A,@var:NopDynPropMeta@propMetaId_4,@var:NopDynEntityMeta@entityMetaId_1,true,roleKey,roleKey Display,VARCHAR,100,0,1,,,,,,,,,,1,0,autotest-ref,*,autotest-ref,*, +A,@var:NopDynPropMeta@propMetaId_3,@var:NopDynEntityMeta@entityMetaId_1,true,roleName,roleName Display,VARCHAR,100,0,1,,,,,,,,,,1,0,autotest-ref,*,autotest-ref,*, +A,@var:NopDynPropMeta@propMetaId_6,@var:NopDynEntityMeta@entityMetaId_2,true,roleId,roleId Display,VARCHAR,32,0,1,,,,,,,,,,1,0,autotest-ref,*,autotest-ref,*, +A,@var:NopDynPropMeta@propMetaId_5,@var:NopDynEntityMeta@entityMetaId_2,true,userId,userId Display,VARCHAR,32,0,1,,,,,,,,,,1,0,autotest-ref,*,autotest-ref,*, +A,@var:NopDynPropMeta@propMetaId,@var:NopDynEntityMeta@entityMetaId,true,userName,userName Display,VARCHAR,100,0,1,,,,,,,,,,1,0,autotest-ref,*,autotest-ref,*, +A,@var:NopDynPropMeta@propMetaId_2,@var:NopDynEntityMeta@entityMetaId,true,roleId,roleId Display,VARCHAR,100,0,1,,,,,,,,,,1,0,autotest-ref,*,autotest-ref,*, +A,@var:NopDynPropMeta@propMetaId_1,@var:NopDynEntityMeta@entityMetaId,true,userAge,userAge Display,INTEGER,0,0,1,,,,,,,,,,1,0,autotest-ref,*,autotest-ref,*, diff --git a/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testOneToManyRelation/output/tables/nop_sys_sequence.csv b/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testOneToManyRelation/output/tables/nop_sys_sequence.csv new file mode 100644 index 000000000..ac6b86349 --- /dev/null +++ b/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testOneToManyRelation/output/tables/nop_sys_sequence.csv @@ -0,0 +1,2 @@ +_chgType,SEQ_NAME,SEQ_TYPE,IS_UUID,NEXT_VALUE,STEP_SIZE,CACHE_SIZE,MAX_VALUE,RESET_TYPE,DEL_FLAG,VERSION,CREATED_BY,CREATE_TIME,UPDATED_BY,UPDATE_TIME,REMARK +A,default,seq,0,1,1,100,,,0,0,autotest-ref,*,autotest-ref,*, diff --git a/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testOneToOneRelation/autotest.yaml b/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testOneToOneRelation/autotest.yaml new file mode 100644 index 000000000..e69de29bb diff --git a/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testOneToOneRelation/init/init.sql b/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testOneToOneRelation/init/init.sql new file mode 100644 index 000000000..8836d5f33 --- /dev/null +++ b/nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testOneToOneRelation/init/init.sql @@ -0,0 +1 @@ +@include: ../../init.sql \ No newline at end of file diff --git a/nop-dyn/nop-dyn-service/src/test/resources/io/nop/dyn/service/codegen/init-db.sql b/nop-dyn/nop-dyn-service/src/test/resources/io/nop/dyn/service/codegen/init-db.sql new file mode 100644 index 000000000..e69de29bb