-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e6e1b03
commit d007d15
Showing
20 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
nop-dyn/nop-dyn-service/cases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/init.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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'); | ||
|
Empty file.
1 change: 1 addition & 0 deletions
1
...es/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testManyToManyRelation/init/init.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@include: ../../init.sql |
Empty file.
1 change: 1 addition & 0 deletions
1
...ses/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testManyToOneRelation/init/init.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@include: ../../init.sql |
4 changes: 4 additions & 0 deletions
4
...odegen/TestDynCodeGenRelation/testManyToOneRelation/output/tables/nop_dyn_entity_meta.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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,*, |
2 changes: 2 additions & 0 deletions
2
...stDynCodeGenRelation/testManyToOneRelation/output/tables/nop_dyn_entity_relation_meta.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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,*, |
2 changes: 2 additions & 0 deletions
2
...ice/codegen/TestDynCodeGenRelation/testManyToOneRelation/output/tables/nop_dyn_module.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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,* |
8 changes: 8 additions & 0 deletions
8
.../codegen/TestDynCodeGenRelation/testManyToOneRelation/output/tables/nop_dyn_prop_meta.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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,*, |
2 changes: 2 additions & 0 deletions
2
...e/codegen/TestDynCodeGenRelation/testManyToOneRelation/output/tables/nop_sys_sequence.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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,*, |
Empty file.
1 change: 1 addition & 0 deletions
1
...ses/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testOneToManyRelation/init/init.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@include: ../../init.sql |
4 changes: 4 additions & 0 deletions
4
...odegen/TestDynCodeGenRelation/testOneToManyRelation/output/tables/nop_dyn_entity_meta.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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,*, |
2 changes: 2 additions & 0 deletions
2
...stDynCodeGenRelation/testOneToManyRelation/output/tables/nop_dyn_entity_relation_meta.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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,*, |
2 changes: 2 additions & 0 deletions
2
...ice/codegen/TestDynCodeGenRelation/testOneToManyRelation/output/tables/nop_dyn_module.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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,* |
8 changes: 8 additions & 0 deletions
8
.../codegen/TestDynCodeGenRelation/testOneToManyRelation/output/tables/nop_dyn_prop_meta.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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,*, |
2 changes: 2 additions & 0 deletions
2
...e/codegen/TestDynCodeGenRelation/testOneToManyRelation/output/tables/nop_sys_sequence.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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,*, |
Empty file.
1 change: 1 addition & 0 deletions
1
...ases/io/nop/dyn/service/codegen/TestDynCodeGenRelation/testOneToOneRelation/init/init.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@include: ../../init.sql |
Empty file.