rez_core 1.0.26 → 1.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.idea/250218_nodejs_core.iml +12 -0
- package/.idea/codeStyles/Project.xml +59 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/dataSources.xml +12 -0
- package/.idea/modules.xml +8 -0
- package/.idea/prettier.xml +6 -0
- package/.idea/vcs.xml +6 -0
- package/dist/app.module.d.ts +0 -0
- package/dist/app.module.js +1 -0
- package/dist/app.module.js.map +1 -0
- package/dist/config/database.config.d.ts +3 -0
- package/dist/config/database.config.js +14 -6
- package/dist/config/database.config.js.map +1 -1
- package/dist/constant/global.constant.d.ts +6 -2
- package/dist/constant/global.constant.js +7 -3
- package/dist/constant/global.constant.js.map +1 -1
- package/dist/main.js +2 -1
- package/dist/main.js.map +1 -1
- package/dist/module/auth/auth.module.js +1 -1
- package/dist/module/auth/auth.module.js.map +1 -1
- package/dist/module/auth/guards/role.guard.js +3 -3
- package/dist/module/auth/strategies/google.strategy.d.ts +3 -1
- package/dist/module/auth/strategies/google.strategy.js +7 -5
- package/dist/module/auth/strategies/google.strategy.js.map +1 -1
- package/dist/module/auth/strategies/jwt.strategy.d.ts +4 -4
- package/dist/module/auth/strategies/jwt.strategy.js +8 -9
- package/dist/module/auth/strategies/jwt.strategy.js.map +1 -1
- package/dist/module/meta/entity/base-entity.entity.d.ts +1 -2
- package/dist/module/meta/entity/base-entity.entity.js +1 -2
- package/dist/module/meta/entity/base-entity.entity.js.map +1 -1
- package/dist/module/meta/entity/entity-master.entity.d.ts +1 -0
- package/dist/module/meta/entity/entity-master.entity.js +4 -0
- package/dist/module/meta/entity/entity-master.entity.js.map +1 -1
- package/dist/module/meta/entity/media-data.entity.d.ts +11 -0
- package/dist/module/meta/entity/media-data.entity.js +55 -0
- package/dist/module/meta/entity/media-data.entity.js.map +1 -0
- package/dist/module/meta/entity.module.js +8 -1
- package/dist/module/meta/entity.module.js.map +1 -1
- package/dist/module/meta/repository/media-data.repository.d.ts +9 -0
- package/dist/module/meta/repository/media-data.repository.js +55 -0
- package/dist/module/meta/repository/media-data.repository.js.map +1 -0
- package/dist/module/meta/service/entity-list.service.d.ts +1 -0
- package/dist/module/meta/service/entity-list.service.js +14 -2
- package/dist/module/meta/service/entity-list.service.js.map +1 -1
- package/dist/module/meta/service/entity-service-impl.service.d.ts +1 -1
- package/dist/module/meta/service/entity-service-impl.service.js +21 -4
- package/dist/module/meta/service/entity-service-impl.service.js.map +1 -1
- package/dist/module/meta/service/media-data.service.d.ts +9 -0
- package/dist/module/meta/service/media-data.service.js +36 -0
- package/dist/module/meta/service/media-data.service.js.map +1 -0
- package/dist/module/module/entity/menu.entity.d.ts +1 -2
- package/dist/module/module/entity/menu.entity.js +1 -2
- package/dist/module/module/entity/menu.entity.js.map +1 -1
- package/dist/module/module/entity/module.entity.d.ts +1 -2
- package/dist/module/module/entity/module.entity.js +1 -2
- package/dist/module/module/entity/module.entity.js.map +1 -1
- package/dist/module/notification/controller/otp.controller.d.ts +5 -3
- package/dist/module/notification/controller/otp.controller.js +7 -4
- package/dist/module/notification/controller/otp.controller.js.map +1 -1
- package/dist/module/notification/service/otp.service.d.ts +5 -3
- package/dist/module/notification/service/otp.service.js +7 -4
- package/dist/module/notification/service/otp.service.js.map +1 -1
- package/dist/module/user/service/login.service.d.ts +3 -1
- package/dist/module/user/service/login.service.js +7 -5
- package/dist/module/user/service/login.service.js.map +1 -1
- package/dist/module/user/service/user.service.d.ts +5 -3
- package/dist/module/user/service/user.service.js +10 -6
- package/dist/module/user/service/user.service.js.map +1 -1
- package/dist/resources/dev.properties.yaml +15 -0
- package/dist/resources/properties.module.d.ts +2 -0
- package/dist/resources/properties.module.js +25 -0
- package/dist/resources/properties.module.js.map +1 -0
- package/dist/resources/properties.yaml.d.ts +2 -0
- package/dist/resources/properties.yaml.js +10 -0
- package/dist/resources/properties.yaml.js.map +1 -0
- package/dist/resources/uat.properties.yaml +15 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/nest-cli.json +6 -0
- package/package.json +1 -1
- package/src/app.module.ts +0 -0
- package/src/config/database.config.ts +10 -5
- package/src/constant/global.constant.ts +13 -4
- package/src/module/auth/auth.module.ts +3 -2
- package/src/module/auth/guards/jwt.guard.ts +22 -22
- package/src/module/auth/guards/role.guard.ts +68 -68
- package/src/module/auth/services/auth.service.ts +29 -29
- package/src/module/auth/services/jwt.service.ts +11 -11
- package/src/module/auth/strategies/google.strategy.ts +7 -4
- package/src/module/auth/strategies/jwt.strategy.ts +5 -6
- package/src/module/auth/strategies/local.strategy.ts +13 -13
- package/src/module/dev/dev.module.ts +12 -12
- package/src/module/dev/service/dev.service.ts +7 -7
- package/src/module/enterprise/entity/enterprise.entity.ts +37 -37
- package/src/module/enterprise/entity/organization.entity.ts +80 -80
- package/src/module/master/controller/master.controller.ts +22 -22
- package/src/module/meta/dto/entity-list-data.dto.ts +6 -6
- package/src/module/meta/entity/attribute-master.entity.ts +67 -67
- package/src/module/meta/entity/base-entity.entity.ts +1 -2
- package/src/module/meta/entity/entity-master.entity.ts +3 -0
- package/src/module/meta/entity/media-data.entity.ts +32 -0
- package/src/module/meta/entity/preference.entity.ts +65 -65
- package/src/module/meta/entity.module.ts +8 -1
- package/src/module/meta/repository/attribute-master.repository.ts +28 -28
- package/src/module/meta/repository/media-data.repository.ts +50 -0
- package/src/module/meta/repository/preference.repository.ts +20 -20
- package/src/module/meta/service/entity-list.service.ts +21 -2
- package/src/module/meta/service/entity-service-impl.service.ts +36 -11
- package/src/module/meta/service/media-data.service.ts +44 -0
- package/src/module/module/controller/menu.controller.ts +15 -15
- package/src/module/module/entity/menu.entity.ts +1 -2
- package/src/module/module/entity/module-access.entity.ts +22 -22
- package/src/module/module/entity/module-action.entity.ts +19 -19
- package/src/module/module/entity/module.entity.ts +1 -2
- package/src/module/notification/controller/otp.controller.ts +8 -3
- package/src/module/notification/service/otp.service.ts +6 -3
- package/src/module/user/controller/user.controller.ts +28 -28
- package/src/module/user/dto/update-user.dto.ts +4 -4
- package/src/module/user/entity/user-role-mapping.entity.ts +21 -21
- package/src/module/user/entity/user-session.entity.ts +61 -61
- package/src/module/user/entity/user.entity.ts +35 -35
- package/src/module/user/repository/role.repository.ts +16 -16
- package/src/module/user/repository/userSession.repository.ts +33 -33
- package/src/module/user/service/login.service.ts +7 -5
- package/src/module/user/service/user.service.ts +10 -7
- package/src/resources/dev.properties.yaml +15 -0
- package/src/resources/properties.module.ts +12 -0
- package/src/resources/properties.yaml.ts +11 -0
- package/src/resources/uat.properties.yaml +15 -0
- package/src/utils/service/encryptUtil.service.ts +97 -97
- package/src/utils/service/excelUtil.service.ts +15 -15
- package/src/utils/service/reflection-helper.service.ts +53 -53
- package/.env +0 -10
- package/dist/constant/status.constant.d.ts +0 -4
- package/dist/constant/status.constant.js +0 -9
- package/dist/constant/status.constant.js.map +0 -1
- package/src/constant/status.constant.ts +0 -3
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
|
|
2
|
-
|
|
3
|
-
@Entity({ name: 'cr_organization' })
|
|
4
|
-
export class OrganizationData {
|
|
5
|
-
@PrimaryGeneratedColumn({ name: 'id', type: 'int' })
|
|
6
|
-
id: number;
|
|
7
|
-
|
|
8
|
-
@Column({ name: 'enterprise_id', type: 'int' })
|
|
9
|
-
enterprise_id: number;
|
|
10
|
-
|
|
11
|
-
@Column({ name: 'code', nullable: true })
|
|
12
|
-
code: string;
|
|
13
|
-
|
|
14
|
-
@Column({ name: 'app_code', nullable: true })
|
|
15
|
-
appCode: string;
|
|
16
|
-
|
|
17
|
-
@Column({ name: 'name', nullable: true })
|
|
18
|
-
name: string;
|
|
19
|
-
|
|
20
|
-
@Column({ name: 'status', type: 'varchar', nullable: true })
|
|
21
|
-
status: string;
|
|
22
|
-
|
|
23
|
-
@Column({ name: 'seq_no', nullable: true })
|
|
24
|
-
seq_no: number;
|
|
25
|
-
|
|
26
|
-
@Column({ name: 'created_by', nullable: true })
|
|
27
|
-
created_by: number;
|
|
28
|
-
|
|
29
|
-
@Column({ name: 'modified_by', nullable: true })
|
|
30
|
-
modified_by: number;
|
|
31
|
-
|
|
32
|
-
@Column({ name: 'created_date', nullable: true })
|
|
33
|
-
created_date: Date;
|
|
34
|
-
|
|
35
|
-
@Column({ name: 'parent_id', nullable: true })
|
|
36
|
-
parent_id: number;
|
|
37
|
-
|
|
38
|
-
@Column({ name: 'modified_date', nullable: true })
|
|
39
|
-
modified_date: Date;
|
|
40
|
-
|
|
41
|
-
@Column({ name: 'contact_number', nullable: true })
|
|
42
|
-
contact_number: string;
|
|
43
|
-
|
|
44
|
-
@Column({ name: 'email', nullable: true })
|
|
45
|
-
emailId: string;
|
|
46
|
-
|
|
47
|
-
@Column({ name: 'entity_type', nullable: true })
|
|
48
|
-
entity_type: string;
|
|
49
|
-
|
|
50
|
-
@Column({ name: 'primary_contact_name', nullable: true })
|
|
51
|
-
primary_contact_name: string;
|
|
52
|
-
|
|
53
|
-
@Column({ name: 'address', nullable: true })
|
|
54
|
-
address: string;
|
|
55
|
-
|
|
56
|
-
@Column({ name: 'gstin', nullable: true })
|
|
57
|
-
gstin: string;
|
|
58
|
-
|
|
59
|
-
@Column({ name: 'company_pan_number', nullable: true })
|
|
60
|
-
company_pan_number: string;
|
|
61
|
-
|
|
62
|
-
@Column({ name: 'bankacc_benef_name', nullable: true })
|
|
63
|
-
bankacc_benef_name: string;
|
|
64
|
-
|
|
65
|
-
@Column({ name: 'bankacc_bank_name', nullable: true })
|
|
66
|
-
bankacc_bank_name: string;
|
|
67
|
-
|
|
68
|
-
@Column({ name: 'bankacc_account_number', nullable: true })
|
|
69
|
-
bankaccAccountNumber: string;
|
|
70
|
-
|
|
71
|
-
@Column({ name: 'bankacc_branch_IFSC', nullable: true })
|
|
72
|
-
bankacc_account_number: string;
|
|
73
|
-
|
|
74
|
-
@Column({
|
|
75
|
-
name: 'organization_type',
|
|
76
|
-
type: 'varchar',
|
|
77
|
-
nullable: true,
|
|
78
|
-
})
|
|
79
|
-
organization_type: string;
|
|
80
|
-
}
|
|
1
|
+
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
|
|
2
|
+
|
|
3
|
+
@Entity({ name: 'cr_organization' })
|
|
4
|
+
export class OrganizationData {
|
|
5
|
+
@PrimaryGeneratedColumn({ name: 'id', type: 'int' })
|
|
6
|
+
id: number;
|
|
7
|
+
|
|
8
|
+
@Column({ name: 'enterprise_id', type: 'int' })
|
|
9
|
+
enterprise_id: number;
|
|
10
|
+
|
|
11
|
+
@Column({ name: 'code', nullable: true })
|
|
12
|
+
code: string;
|
|
13
|
+
|
|
14
|
+
@Column({ name: 'app_code', nullable: true })
|
|
15
|
+
appCode: string;
|
|
16
|
+
|
|
17
|
+
@Column({ name: 'name', nullable: true })
|
|
18
|
+
name: string;
|
|
19
|
+
|
|
20
|
+
@Column({ name: 'status', type: 'varchar', nullable: true })
|
|
21
|
+
status: string;
|
|
22
|
+
|
|
23
|
+
@Column({ name: 'seq_no', nullable: true })
|
|
24
|
+
seq_no: number;
|
|
25
|
+
|
|
26
|
+
@Column({ name: 'created_by', nullable: true })
|
|
27
|
+
created_by: number;
|
|
28
|
+
|
|
29
|
+
@Column({ name: 'modified_by', nullable: true })
|
|
30
|
+
modified_by: number;
|
|
31
|
+
|
|
32
|
+
@Column({ name: 'created_date', nullable: true })
|
|
33
|
+
created_date: Date;
|
|
34
|
+
|
|
35
|
+
@Column({ name: 'parent_id', nullable: true })
|
|
36
|
+
parent_id: number;
|
|
37
|
+
|
|
38
|
+
@Column({ name: 'modified_date', nullable: true })
|
|
39
|
+
modified_date: Date;
|
|
40
|
+
|
|
41
|
+
@Column({ name: 'contact_number', nullable: true })
|
|
42
|
+
contact_number: string;
|
|
43
|
+
|
|
44
|
+
@Column({ name: 'email', nullable: true })
|
|
45
|
+
emailId: string;
|
|
46
|
+
|
|
47
|
+
@Column({ name: 'entity_type', nullable: true })
|
|
48
|
+
entity_type: string;
|
|
49
|
+
|
|
50
|
+
@Column({ name: 'primary_contact_name', nullable: true })
|
|
51
|
+
primary_contact_name: string;
|
|
52
|
+
|
|
53
|
+
@Column({ name: 'address', nullable: true })
|
|
54
|
+
address: string;
|
|
55
|
+
|
|
56
|
+
@Column({ name: 'gstin', nullable: true })
|
|
57
|
+
gstin: string;
|
|
58
|
+
|
|
59
|
+
@Column({ name: 'company_pan_number', nullable: true })
|
|
60
|
+
company_pan_number: string;
|
|
61
|
+
|
|
62
|
+
@Column({ name: 'bankacc_benef_name', nullable: true })
|
|
63
|
+
bankacc_benef_name: string;
|
|
64
|
+
|
|
65
|
+
@Column({ name: 'bankacc_bank_name', nullable: true })
|
|
66
|
+
bankacc_bank_name: string;
|
|
67
|
+
|
|
68
|
+
@Column({ name: 'bankacc_account_number', nullable: true })
|
|
69
|
+
bankaccAccountNumber: string;
|
|
70
|
+
|
|
71
|
+
@Column({ name: 'bankacc_branch_IFSC', nullable: true })
|
|
72
|
+
bankacc_account_number: string;
|
|
73
|
+
|
|
74
|
+
@Column({
|
|
75
|
+
name: 'organization_type',
|
|
76
|
+
type: 'varchar',
|
|
77
|
+
nullable: true,
|
|
78
|
+
})
|
|
79
|
+
organization_type: string;
|
|
80
|
+
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Controller,
|
|
3
|
-
Post,
|
|
4
|
-
UploadedFile,
|
|
5
|
-
UseInterceptors,
|
|
6
|
-
} from '@nestjs/common';
|
|
7
|
-
import { FileInterceptor } from '@nestjs/platform-express';
|
|
8
|
-
import { MasterService } from '../service/master.service';
|
|
9
|
-
|
|
10
|
-
@Controller('master')
|
|
11
|
-
export class MasterController {
|
|
12
|
-
constructor(private readonly masterService: MasterService) {}
|
|
13
|
-
|
|
14
|
-
@Post('upload')
|
|
15
|
-
@UseInterceptors(FileInterceptor('file'))
|
|
16
|
-
async uploadFile(@UploadedFile() file) {
|
|
17
|
-
if (!file) {
|
|
18
|
-
throw new Error('File is required');
|
|
19
|
-
}
|
|
20
|
-
return this.masterService.processExcel(file);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
Controller,
|
|
3
|
+
Post,
|
|
4
|
+
UploadedFile,
|
|
5
|
+
UseInterceptors,
|
|
6
|
+
} from '@nestjs/common';
|
|
7
|
+
import { FileInterceptor } from '@nestjs/platform-express';
|
|
8
|
+
import { MasterService } from '../service/master.service';
|
|
9
|
+
|
|
10
|
+
@Controller('master')
|
|
11
|
+
export class MasterController {
|
|
12
|
+
constructor(private readonly masterService: MasterService) {}
|
|
13
|
+
|
|
14
|
+
@Post('upload')
|
|
15
|
+
@UseInterceptors(FileInterceptor('file'))
|
|
16
|
+
async uploadFile(@UploadedFile() file) {
|
|
17
|
+
if (!file) {
|
|
18
|
+
throw new Error('File is required');
|
|
19
|
+
}
|
|
20
|
+
return this.masterService.processExcel(file);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { EntityTab } from './entity-tab.dto';
|
|
2
|
-
|
|
3
|
-
export class EntityListData {
|
|
4
|
-
entity_list: any;
|
|
5
|
-
entity_tabs: EntityTab[];
|
|
6
|
-
}
|
|
1
|
+
import { EntityTab } from './entity-tab.dto';
|
|
2
|
+
|
|
3
|
+
export class EntityListData {
|
|
4
|
+
entity_list: any;
|
|
5
|
+
entity_tabs: EntityTab[];
|
|
6
|
+
}
|
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
import { BaseEntity } from './base-entity.entity';
|
|
2
|
-
import { Column, Entity } from 'typeorm';
|
|
3
|
-
|
|
4
|
-
@Entity({ name: 'cr_attribute_master' })
|
|
5
|
-
export class AttributeMaster extends BaseEntity {
|
|
6
|
-
@Column({ name: 'mapped_entity_type', type: 'varchar', nullable: true })
|
|
7
|
-
mapped_entity_type: string;
|
|
8
|
-
|
|
9
|
-
@Column({ name: 'mapped_entity_id' })
|
|
10
|
-
mapped_entity_id: number;
|
|
11
|
-
|
|
12
|
-
@Column({ name: 'element_type', type: 'varchar', nullable: true, length: 50 })
|
|
13
|
-
element_type: string;
|
|
14
|
-
|
|
15
|
-
@Column({
|
|
16
|
-
name: 'data_source_type',
|
|
17
|
-
type: 'varchar',
|
|
18
|
-
nullable: true,
|
|
19
|
-
length: 50,
|
|
20
|
-
})
|
|
21
|
-
data_source_type: string;
|
|
22
|
-
|
|
23
|
-
@Column({ name: 'datasource_list', type: 'varchar', nullable: true })
|
|
24
|
-
datasource_list: string;
|
|
25
|
-
|
|
26
|
-
@Column({
|
|
27
|
-
name: 'custom_values',
|
|
28
|
-
type: 'varchar',
|
|
29
|
-
length: 2000,
|
|
30
|
-
nullable: true,
|
|
31
|
-
})
|
|
32
|
-
custom_values: string;
|
|
33
|
-
|
|
34
|
-
@Column({ name: 'max_length', nullable: true })
|
|
35
|
-
max_length: number;
|
|
36
|
-
|
|
37
|
-
@Column({ name: 'required', nullable: true })
|
|
38
|
-
required: number;
|
|
39
|
-
|
|
40
|
-
@Column({
|
|
41
|
-
name: 'description',
|
|
42
|
-
type: 'varchar',
|
|
43
|
-
length: 2000,
|
|
44
|
-
nullable: true,
|
|
45
|
-
})
|
|
46
|
-
description: string;
|
|
47
|
-
|
|
48
|
-
@Column({
|
|
49
|
-
name: 'attribute_key',
|
|
50
|
-
type: 'varchar',
|
|
51
|
-
nullable: true,
|
|
52
|
-
length: 50,
|
|
53
|
-
})
|
|
54
|
-
attribute_key: string;
|
|
55
|
-
|
|
56
|
-
@Column({ name: 'db_datatype', type: 'varchar', nullable: true, length: 50 })
|
|
57
|
-
db_datatype: string;
|
|
58
|
-
|
|
59
|
-
@Column({ name: 'category', type: 'varchar', nullable: true, length: 50 })
|
|
60
|
-
category: string;
|
|
61
|
-
|
|
62
|
-
@Column({ name: 'is_unique', nullable: true })
|
|
63
|
-
is_unique: number;
|
|
64
|
-
|
|
65
|
-
@Column({ name: 'can_export', nullable: true })
|
|
66
|
-
can_export: number;
|
|
67
|
-
}
|
|
1
|
+
import { BaseEntity } from './base-entity.entity';
|
|
2
|
+
import { Column, Entity } from 'typeorm';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'cr_attribute_master' })
|
|
5
|
+
export class AttributeMaster extends BaseEntity {
|
|
6
|
+
@Column({ name: 'mapped_entity_type', type: 'varchar', nullable: true })
|
|
7
|
+
mapped_entity_type: string;
|
|
8
|
+
|
|
9
|
+
@Column({ name: 'mapped_entity_id' })
|
|
10
|
+
mapped_entity_id: number;
|
|
11
|
+
|
|
12
|
+
@Column({ name: 'element_type', type: 'varchar', nullable: true, length: 50 })
|
|
13
|
+
element_type: string;
|
|
14
|
+
|
|
15
|
+
@Column({
|
|
16
|
+
name: 'data_source_type',
|
|
17
|
+
type: 'varchar',
|
|
18
|
+
nullable: true,
|
|
19
|
+
length: 50,
|
|
20
|
+
})
|
|
21
|
+
data_source_type: string;
|
|
22
|
+
|
|
23
|
+
@Column({ name: 'datasource_list', type: 'varchar', nullable: true })
|
|
24
|
+
datasource_list: string;
|
|
25
|
+
|
|
26
|
+
@Column({
|
|
27
|
+
name: 'custom_values',
|
|
28
|
+
type: 'varchar',
|
|
29
|
+
length: 2000,
|
|
30
|
+
nullable: true,
|
|
31
|
+
})
|
|
32
|
+
custom_values: string;
|
|
33
|
+
|
|
34
|
+
@Column({ name: 'max_length', nullable: true })
|
|
35
|
+
max_length: number;
|
|
36
|
+
|
|
37
|
+
@Column({ name: 'required', nullable: true })
|
|
38
|
+
required: number;
|
|
39
|
+
|
|
40
|
+
@Column({
|
|
41
|
+
name: 'description',
|
|
42
|
+
type: 'varchar',
|
|
43
|
+
length: 2000,
|
|
44
|
+
nullable: true,
|
|
45
|
+
})
|
|
46
|
+
description: string;
|
|
47
|
+
|
|
48
|
+
@Column({
|
|
49
|
+
name: 'attribute_key',
|
|
50
|
+
type: 'varchar',
|
|
51
|
+
nullable: true,
|
|
52
|
+
length: 50,
|
|
53
|
+
})
|
|
54
|
+
attribute_key: string;
|
|
55
|
+
|
|
56
|
+
@Column({ name: 'db_datatype', type: 'varchar', nullable: true, length: 50 })
|
|
57
|
+
db_datatype: string;
|
|
58
|
+
|
|
59
|
+
@Column({ name: 'category', type: 'varchar', nullable: true, length: 50 })
|
|
60
|
+
category: string;
|
|
61
|
+
|
|
62
|
+
@Column({ name: 'is_unique', nullable: true })
|
|
63
|
+
is_unique: number;
|
|
64
|
+
|
|
65
|
+
@Column({ name: 'can_export', nullable: true })
|
|
66
|
+
can_export: number;
|
|
67
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Column, PrimaryGeneratedColumn } from 'typeorm';
|
|
2
|
-
import { StatusType } from '../../../constant/status.constant';
|
|
3
2
|
import { Expose } from 'class-transformer';
|
|
4
3
|
|
|
5
4
|
export class BaseEntity {
|
|
@@ -18,7 +17,7 @@ export class BaseEntity {
|
|
|
18
17
|
name: string;
|
|
19
18
|
@Column({ name: 'status', type: 'varchar', nullable: true, length: 100 })
|
|
20
19
|
@Expose()
|
|
21
|
-
status:
|
|
20
|
+
status: string;
|
|
22
21
|
@Column({ name: 'parent_type', type: 'varchar', length: 100, nullable: true })
|
|
23
22
|
@Expose()
|
|
24
23
|
parent_type: string;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Column, Entity } from 'typeorm';
|
|
2
|
+
import { BaseEntity } from './base-entity.entity';
|
|
3
|
+
import { ENTITYTYPE_MEDIA } from '../../../constant/global.constant';
|
|
4
|
+
|
|
5
|
+
@Entity({ name: 'cr_media_data' })
|
|
6
|
+
export class MediaData extends BaseEntity {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.entity_type = ENTITYTYPE_MEDIA;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
13
|
+
file_name: string;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
16
|
+
mapped_attribute_key: string;
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
19
|
+
mapped_entity_type: string;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'bigint', nullable: true })
|
|
22
|
+
mapped_entity_id: number;
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'varchar', length: 200, nullable: true })
|
|
25
|
+
media_url: string;
|
|
26
|
+
|
|
27
|
+
@Column({ type: 'varchar', length: 30, nullable: true })
|
|
28
|
+
extension: string;
|
|
29
|
+
|
|
30
|
+
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
31
|
+
content_type: string;
|
|
32
|
+
}
|
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
import { BaseEntity } from './base-entity.entity';
|
|
2
|
-
import { Column, Entity } from 'typeorm';
|
|
3
|
-
import { ENTITYTYPE_PREFERENCEMASTER } from '../../../constant/global.constant';
|
|
4
|
-
|
|
5
|
-
@Entity({ name: 'cr_preference_master' })
|
|
6
|
-
export class PreferenceMaster extends BaseEntity {
|
|
7
|
-
constructor() {
|
|
8
|
-
super();
|
|
9
|
-
this.entity_type = ENTITYTYPE_PREFERENCEMASTER;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
@Column({ name: 'appcode', type: 'varchar', length: 200, nullable: true })
|
|
13
|
-
appCode: string;
|
|
14
|
-
|
|
15
|
-
@Column({
|
|
16
|
-
name: 'display_name',
|
|
17
|
-
type: 'varchar',
|
|
18
|
-
length: 200,
|
|
19
|
-
nullable: true,
|
|
20
|
-
})
|
|
21
|
-
display_name: string;
|
|
22
|
-
|
|
23
|
-
@Column({
|
|
24
|
-
name: 'preference_key',
|
|
25
|
-
type: 'varchar',
|
|
26
|
-
length: 200,
|
|
27
|
-
nullable: true,
|
|
28
|
-
})
|
|
29
|
-
preference_key: string;
|
|
30
|
-
|
|
31
|
-
@Column({
|
|
32
|
-
name: 'preference_value',
|
|
33
|
-
type: 'varchar',
|
|
34
|
-
length: 200,
|
|
35
|
-
nullable: true,
|
|
36
|
-
})
|
|
37
|
-
preference_value: string;
|
|
38
|
-
|
|
39
|
-
@Column({
|
|
40
|
-
name: 'description',
|
|
41
|
-
type: 'varchar',
|
|
42
|
-
length: 2000,
|
|
43
|
-
nullable: true,
|
|
44
|
-
})
|
|
45
|
-
description: string;
|
|
46
|
-
|
|
47
|
-
@Column({ name: 'reflect_on', type: 'varchar', length: 200, nullable: true })
|
|
48
|
-
reflect_on: string;
|
|
49
|
-
|
|
50
|
-
@Column({
|
|
51
|
-
name: 'default_value',
|
|
52
|
-
type: 'varchar',
|
|
53
|
-
length: 200,
|
|
54
|
-
nullable: true,
|
|
55
|
-
})
|
|
56
|
-
default_value: string;
|
|
57
|
-
|
|
58
|
-
@Column({
|
|
59
|
-
name: 'possible_values',
|
|
60
|
-
type: 'varchar',
|
|
61
|
-
length: 200,
|
|
62
|
-
nullable: true,
|
|
63
|
-
})
|
|
64
|
-
possible_values: string;
|
|
65
|
-
}
|
|
1
|
+
import { BaseEntity } from './base-entity.entity';
|
|
2
|
+
import { Column, Entity } from 'typeorm';
|
|
3
|
+
import { ENTITYTYPE_PREFERENCEMASTER } from '../../../constant/global.constant';
|
|
4
|
+
|
|
5
|
+
@Entity({ name: 'cr_preference_master' })
|
|
6
|
+
export class PreferenceMaster extends BaseEntity {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.entity_type = ENTITYTYPE_PREFERENCEMASTER;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@Column({ name: 'appcode', type: 'varchar', length: 200, nullable: true })
|
|
13
|
+
appCode: string;
|
|
14
|
+
|
|
15
|
+
@Column({
|
|
16
|
+
name: 'display_name',
|
|
17
|
+
type: 'varchar',
|
|
18
|
+
length: 200,
|
|
19
|
+
nullable: true,
|
|
20
|
+
})
|
|
21
|
+
display_name: string;
|
|
22
|
+
|
|
23
|
+
@Column({
|
|
24
|
+
name: 'preference_key',
|
|
25
|
+
type: 'varchar',
|
|
26
|
+
length: 200,
|
|
27
|
+
nullable: true,
|
|
28
|
+
})
|
|
29
|
+
preference_key: string;
|
|
30
|
+
|
|
31
|
+
@Column({
|
|
32
|
+
name: 'preference_value',
|
|
33
|
+
type: 'varchar',
|
|
34
|
+
length: 200,
|
|
35
|
+
nullable: true,
|
|
36
|
+
})
|
|
37
|
+
preference_value: string;
|
|
38
|
+
|
|
39
|
+
@Column({
|
|
40
|
+
name: 'description',
|
|
41
|
+
type: 'varchar',
|
|
42
|
+
length: 2000,
|
|
43
|
+
nullable: true,
|
|
44
|
+
})
|
|
45
|
+
description: string;
|
|
46
|
+
|
|
47
|
+
@Column({ name: 'reflect_on', type: 'varchar', length: 200, nullable: true })
|
|
48
|
+
reflect_on: string;
|
|
49
|
+
|
|
50
|
+
@Column({
|
|
51
|
+
name: 'default_value',
|
|
52
|
+
type: 'varchar',
|
|
53
|
+
length: 200,
|
|
54
|
+
nullable: true,
|
|
55
|
+
})
|
|
56
|
+
default_value: string;
|
|
57
|
+
|
|
58
|
+
@Column({
|
|
59
|
+
name: 'possible_values',
|
|
60
|
+
type: 'varchar',
|
|
61
|
+
length: 200,
|
|
62
|
+
nullable: true,
|
|
63
|
+
})
|
|
64
|
+
possible_values: string;
|
|
65
|
+
}
|
|
@@ -19,6 +19,9 @@ import { EntityTableService } from './service/entity-table.service';
|
|
|
19
19
|
import { EntityTableColumnRepository } from './repository/entity-table-column.repository';
|
|
20
20
|
import { EntityTableColumnService } from './service/entity-table-column.service';
|
|
21
21
|
import { EntityListService } from './service/entity-list.service';
|
|
22
|
+
import { MediaData } from './entity/media-data.entity';
|
|
23
|
+
import { MediaDataService } from './service/media-data.service';
|
|
24
|
+
import { MediaDataRepository } from './repository/media-data.repository';
|
|
22
25
|
|
|
23
26
|
@Module({
|
|
24
27
|
imports: [
|
|
@@ -28,6 +31,7 @@ import { EntityListService } from './service/entity-list.service';
|
|
|
28
31
|
PreferenceMaster,
|
|
29
32
|
EntityTable,
|
|
30
33
|
EntityTableColumn,
|
|
34
|
+
MediaData
|
|
31
35
|
]),
|
|
32
36
|
UtilsModule,
|
|
33
37
|
],
|
|
@@ -43,6 +47,8 @@ import { EntityListService } from './service/entity-list.service';
|
|
|
43
47
|
EntityTableColumnRepository,
|
|
44
48
|
EntityTableColumnService,
|
|
45
49
|
EntityListService,
|
|
50
|
+
MediaDataRepository,
|
|
51
|
+
MediaDataService,
|
|
46
52
|
],
|
|
47
53
|
exports: [
|
|
48
54
|
EntityMasterService,
|
|
@@ -50,7 +56,8 @@ import { EntityListService } from './service/entity-list.service';
|
|
|
50
56
|
PreferenceService,
|
|
51
57
|
EntityListService,
|
|
52
58
|
EntityTableService,
|
|
53
|
-
EntityTableColumnService
|
|
59
|
+
EntityTableColumnService,
|
|
60
|
+
MediaDataService,
|
|
54
61
|
],
|
|
55
62
|
controllers: [EntityController, MasterController],
|
|
56
63
|
})
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { Injectable } from '@nestjs/common';
|
|
2
|
-
import { InjectRepository } from '@nestjs/typeorm';
|
|
3
|
-
import { AttributeMaster } from '../entity/attribute-master.entity';
|
|
4
|
-
import { Repository } from 'typeorm';
|
|
5
|
-
|
|
6
|
-
@Injectable()
|
|
7
|
-
export class AttributeMasterRepository {
|
|
8
|
-
constructor(
|
|
9
|
-
@InjectRepository(AttributeMaster)
|
|
10
|
-
private readonly attributeMasterRepository: Repository<AttributeMaster>,
|
|
11
|
-
) {}
|
|
12
|
-
|
|
13
|
-
async findByMappedEntityIdAndMappedEntityTypeAndAttributeKeyAndOrganizationId(
|
|
14
|
-
mappedEntityId: number,
|
|
15
|
-
mappedEntityType: string,
|
|
16
|
-
attributeKey: string,
|
|
17
|
-
organizationId: number,
|
|
18
|
-
): Promise<AttributeMaster | null> {
|
|
19
|
-
return await this.attributeMasterRepository.findOne({
|
|
20
|
-
where: {
|
|
21
|
-
mapped_entity_id: mappedEntityId,
|
|
22
|
-
mapped_entity_type: mappedEntityType,
|
|
23
|
-
attribute_key: attributeKey,
|
|
24
|
-
organization_id: organizationId,
|
|
25
|
-
},
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
}
|
|
1
|
+
import { Injectable } from '@nestjs/common';
|
|
2
|
+
import { InjectRepository } from '@nestjs/typeorm';
|
|
3
|
+
import { AttributeMaster } from '../entity/attribute-master.entity';
|
|
4
|
+
import { Repository } from 'typeorm';
|
|
5
|
+
|
|
6
|
+
@Injectable()
|
|
7
|
+
export class AttributeMasterRepository {
|
|
8
|
+
constructor(
|
|
9
|
+
@InjectRepository(AttributeMaster)
|
|
10
|
+
private readonly attributeMasterRepository: Repository<AttributeMaster>,
|
|
11
|
+
) {}
|
|
12
|
+
|
|
13
|
+
async findByMappedEntityIdAndMappedEntityTypeAndAttributeKeyAndOrganizationId(
|
|
14
|
+
mappedEntityId: number,
|
|
15
|
+
mappedEntityType: string,
|
|
16
|
+
attributeKey: string,
|
|
17
|
+
organizationId: number,
|
|
18
|
+
): Promise<AttributeMaster | null> {
|
|
19
|
+
return await this.attributeMasterRepository.findOne({
|
|
20
|
+
where: {
|
|
21
|
+
mapped_entity_id: mappedEntityId,
|
|
22
|
+
mapped_entity_type: mappedEntityType,
|
|
23
|
+
attribute_key: attributeKey,
|
|
24
|
+
organization_id: organizationId,
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|