rez_core 1.0.62 → 1.0.64
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/constant/global.constant.d.ts +3 -0
- package/dist/constant/global.constant.js +4 -1
- package/dist/constant/global.constant.js.map +1 -1
- package/dist/module/auth/guards/role.guard.js +3 -3
- package/dist/module/listmaster/controller/list-master.controller.d.ts +1 -1
- package/dist/module/listmaster/controller/list-master.controller.js +3 -4
- package/dist/module/listmaster/controller/list-master.controller.js.map +1 -1
- package/dist/module/listmaster/service/list-master.service.d.ts +4 -2
- package/dist/module/listmaster/service/list-master.service.js +16 -14
- package/dist/module/listmaster/service/list-master.service.js.map +1 -1
- package/dist/module/meta/controller/meta.controller.d.ts +7 -0
- package/dist/module/meta/controller/meta.controller.js +47 -0
- package/dist/module/meta/controller/meta.controller.js.map +1 -0
- package/dist/module/meta/dto/entity-table.dto.d.ts +5 -0
- package/dist/module/meta/dto/entity-table.dto.js +8 -0
- package/dist/module/meta/dto/entity-table.dto.js.map +1 -0
- package/dist/module/meta/entity.module.js +2 -1
- package/dist/module/meta/entity.module.js.map +1 -1
- package/dist/module/meta/repository/entity-table-column.repository.js +1 -0
- package/dist/module/meta/repository/entity-table-column.repository.js.map +1 -1
- package/dist/module/meta/service/entity-table.service.d.ts +6 -1
- package/dist/module/meta/service/entity-table.service.js +18 -2
- package/dist/module/meta/service/entity-table.service.js.map +1 -1
- package/dist/module/user/entity/role.entity.d.ts +1 -0
- package/dist/module/user/entity/role.entity.js +5 -0
- package/dist/module/user/entity/role.entity.js.map +1 -1
- package/dist/module/user/repository/role.repository.d.ts +2 -35
- package/dist/module/user/repository/role.repository.js +2 -95
- package/dist/module/user/repository/role.repository.js.map +1 -1
- package/dist/module/user/service/role.service.d.ts +5 -32
- package/dist/module/user/service/role.service.js +71 -24
- package/dist/module/user/service/role.service.js.map +1 -1
- package/dist/module/user/user.module.js +8 -3
- package/dist/module/user/user.module.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/app.controller.ts +12 -12
- package/src/app.service.ts +8 -8
- package/src/constant/global.constant.ts +5 -0
- 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/jwt.service.ts +11 -11
- 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/organization.entity.ts +80 -80
- package/src/module/listmaster/controller/list-master.controller.ts +2 -2
- package/src/module/listmaster/service/list-master.service.ts +18 -15
- package/src/module/meta/controller/meta.controller.ts +22 -0
- package/src/module/meta/dto/entity-list-data.dto.ts +6 -6
- package/src/module/meta/dto/entity-table.dto.ts +6 -0
- package/src/module/meta/entity/preference.entity.ts +65 -65
- package/src/module/meta/entity.module.ts +2 -1
- package/src/module/meta/repository/entity-table-column.repository.ts +1 -0
- package/src/module/meta/repository/preference.repository.ts +20 -20
- package/src/module/meta/service/entity-table.service.ts +43 -3
- package/src/module/module/controller/menu.controller.ts +15 -15
- package/src/module/module/entity/module-access.entity.ts +22 -22
- 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/role.entity.ts +4 -0
- package/src/module/user/entity/user-session.entity.ts +61 -61
- package/src/module/user/repository/role.repository.ts +2 -142
- package/src/module/user/repository/userSession.repository.ts +33 -33
- package/src/module/user/service/role.service.ts +92 -42
- package/src/module/user/user.module.ts +8 -3
- 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/dist/module/user/controller/role.controller.d.ts +0 -41
- package/dist/module/user/controller/role.controller.js +0 -63
- package/dist/module/user/controller/role.controller.js.map +0 -1
- package/src/module/user/controller/role.controller.ts +0 -55
|
@@ -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
|
+
}
|
|
@@ -34,6 +34,7 @@ import { FieldGroupService } from './service/field-group.service';
|
|
|
34
34
|
import { ViewMasterService } from './service/view-master.service';
|
|
35
35
|
import { ViewMasterController } from './controller/view-master.controller';
|
|
36
36
|
import { ViewMaterRespository } from './repository/view-master.repository';
|
|
37
|
+
import { MetaController } from './controller/meta.controller';
|
|
37
38
|
|
|
38
39
|
@Module({
|
|
39
40
|
imports: [
|
|
@@ -84,6 +85,6 @@ import { ViewMaterRespository } from './repository/view-master.repository';
|
|
|
84
85
|
FieldGroupService,
|
|
85
86
|
'ViewMasterService',
|
|
86
87
|
],
|
|
87
|
-
controllers: [EntityController, MasterController, MediaController, ViewMasterController],
|
|
88
|
+
controllers: [EntityController, MasterController, MediaController, ViewMasterController, MetaController],
|
|
88
89
|
})
|
|
89
90
|
export class EntityModule {}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { Injectable } from '@nestjs/common';
|
|
2
|
-
import { InjectRepository } from '@nestjs/typeorm';
|
|
3
|
-
import { PreferenceMaster } from '../entity/preference.entity';
|
|
4
|
-
import { Repository } from 'typeorm';
|
|
5
|
-
|
|
6
|
-
@Injectable()
|
|
7
|
-
export class PreferenceRepository {
|
|
8
|
-
constructor(
|
|
9
|
-
@InjectRepository(PreferenceMaster)
|
|
10
|
-
private readonly preferenceRepository: Repository<PreferenceMaster>,
|
|
11
|
-
) {}
|
|
12
|
-
|
|
13
|
-
async findByPreferenceKey(
|
|
14
|
-
preferenceKey: string,
|
|
15
|
-
): Promise<PreferenceMaster | null> {
|
|
16
|
-
return await this.preferenceRepository.findOne({
|
|
17
|
-
where: { preference_key: preferenceKey },
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
}
|
|
1
|
+
import { Injectable } from '@nestjs/common';
|
|
2
|
+
import { InjectRepository } from '@nestjs/typeorm';
|
|
3
|
+
import { PreferenceMaster } from '../entity/preference.entity';
|
|
4
|
+
import { Repository } from 'typeorm';
|
|
5
|
+
|
|
6
|
+
@Injectable()
|
|
7
|
+
export class PreferenceRepository {
|
|
8
|
+
constructor(
|
|
9
|
+
@InjectRepository(PreferenceMaster)
|
|
10
|
+
private readonly preferenceRepository: Repository<PreferenceMaster>,
|
|
11
|
+
) {}
|
|
12
|
+
|
|
13
|
+
async findByPreferenceKey(
|
|
14
|
+
preferenceKey: string,
|
|
15
|
+
): Promise<PreferenceMaster | null> {
|
|
16
|
+
return await this.preferenceRepository.findOne({
|
|
17
|
+
where: { preference_key: preferenceKey },
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { Injectable } from '@nestjs/common';
|
|
2
2
|
import { EntityTableRepository } from '../repository/entity-table.repository';
|
|
3
|
+
import { EntityTableColumnRepository } from '../repository/entity-table-column.repository';
|
|
4
|
+
import { EntityTableDto } from '../dto/entity-table.dto';
|
|
5
|
+
import { DISPLAY_LIST } from '../../../constant/global.constant';
|
|
3
6
|
|
|
4
7
|
@Injectable()
|
|
5
8
|
export class EntityTableService {
|
|
6
|
-
constructor(
|
|
9
|
+
constructor(
|
|
10
|
+
private entityTableRepository: EntityTableRepository,
|
|
11
|
+
private readonly entityTableColumnRepository: EntityTableColumnRepository,
|
|
12
|
+
) {}
|
|
7
13
|
|
|
8
14
|
async findByEntityTypeAndListType(entityType: string, listType: string) {
|
|
9
15
|
return await this.entityTableRepository.findByEntityTypeAndListType(
|
|
@@ -12,7 +18,41 @@ export class EntityTableService {
|
|
|
12
18
|
);
|
|
13
19
|
}
|
|
14
20
|
|
|
15
|
-
async findByEntityTypeAndListTypeAndDisplayType(
|
|
16
|
-
|
|
21
|
+
async findByEntityTypeAndListTypeAndDisplayType(
|
|
22
|
+
entityType: string,
|
|
23
|
+
listType: string,
|
|
24
|
+
displayType: string,
|
|
25
|
+
) {
|
|
26
|
+
return await this.entityTableRepository.findByEntityTypeAndListTypeAndDisplayType(
|
|
27
|
+
entityType,
|
|
28
|
+
listType,
|
|
29
|
+
displayType,
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
async getTableMetaDataForListing(entityType: string, listType: string) {
|
|
34
|
+
return await this.getTableMetaData(entityType, listType, DISPLAY_LIST);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
async getTableMetaData(
|
|
38
|
+
entityType: string,
|
|
39
|
+
listType: string,
|
|
40
|
+
displayType: string,
|
|
41
|
+
) {
|
|
42
|
+
let entityTable = await this.findByEntityTypeAndListTypeAndDisplayType(
|
|
43
|
+
entityType,
|
|
44
|
+
listType,
|
|
45
|
+
displayType,
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
let entityTableDto = entityTable as EntityTableDto;
|
|
49
|
+
if (entityTable) {
|
|
50
|
+
entityTableDto.column_list =
|
|
51
|
+
await this.entityTableColumnRepository.findByParentIdAndParentType(
|
|
52
|
+
entityTable.id,
|
|
53
|
+
entityTable.entity_type,
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
return entityTableDto;
|
|
17
57
|
}
|
|
18
58
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { Controller, Get, Request, UseGuards } from '@nestjs/common';
|
|
2
|
-
import { MenuService } from '../service/menu.service';
|
|
3
|
-
import { JwtAuthGuard } from 'src/module/auth/guards/jwt.guard';
|
|
4
|
-
|
|
5
|
-
@Controller('menu')
|
|
6
|
-
export class MenuController {
|
|
7
|
-
constructor(private readonly menuService: MenuService) {}
|
|
8
|
-
|
|
9
|
-
@UseGuards(JwtAuthGuard)
|
|
10
|
-
@Get()
|
|
11
|
-
async getMenu(@Request() req) {
|
|
12
|
-
const userId = req.user.userId;
|
|
13
|
-
return this.menuService.getUserMenu(userId);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
1
|
+
import { Controller, Get, Request, UseGuards } from '@nestjs/common';
|
|
2
|
+
import { MenuService } from '../service/menu.service';
|
|
3
|
+
import { JwtAuthGuard } from 'src/module/auth/guards/jwt.guard';
|
|
4
|
+
|
|
5
|
+
@Controller('menu')
|
|
6
|
+
export class MenuController {
|
|
7
|
+
constructor(private readonly menuService: MenuService) {}
|
|
8
|
+
|
|
9
|
+
@UseGuards(JwtAuthGuard)
|
|
10
|
+
@Get()
|
|
11
|
+
async getMenu(@Request() req) {
|
|
12
|
+
const userId = req.user.userId;
|
|
13
|
+
return this.menuService.getUserMenu(userId);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
|
|
2
|
-
|
|
3
|
-
@Entity({ name: 'cr_module_access' })
|
|
4
|
-
export class ModuleAccess {
|
|
5
|
-
@PrimaryGeneratedColumn()
|
|
6
|
-
id: number;
|
|
7
|
-
|
|
8
|
-
@Column({type: 'varchar', length: 100, nullable: true})
|
|
9
|
-
module_code: string;
|
|
10
|
-
|
|
11
|
-
@Column({type: 'varchar', length: 100, nullable: true })
|
|
12
|
-
role_code: string;
|
|
13
|
-
|
|
14
|
-
@Column({type: 'int', nullable: true })
|
|
15
|
-
access_flag: number;
|
|
16
|
-
|
|
17
|
-
@Column({type: 'varchar', length: 100, nullable: true })
|
|
18
|
-
action_type: string;
|
|
19
|
-
|
|
20
|
-
@Column({type: 'varchar', length: 100, nullable: true})
|
|
21
|
-
app_code: string;
|
|
22
|
-
}
|
|
1
|
+
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
|
|
2
|
+
|
|
3
|
+
@Entity({ name: 'cr_module_access' })
|
|
4
|
+
export class ModuleAccess {
|
|
5
|
+
@PrimaryGeneratedColumn()
|
|
6
|
+
id: number;
|
|
7
|
+
|
|
8
|
+
@Column({type: 'varchar', length: 100, nullable: true})
|
|
9
|
+
module_code: string;
|
|
10
|
+
|
|
11
|
+
@Column({type: 'varchar', length: 100, nullable: true })
|
|
12
|
+
role_code: string;
|
|
13
|
+
|
|
14
|
+
@Column({type: 'int', nullable: true })
|
|
15
|
+
access_flag: number;
|
|
16
|
+
|
|
17
|
+
@Column({type: 'varchar', length: 100, nullable: true })
|
|
18
|
+
action_type: string;
|
|
19
|
+
|
|
20
|
+
@Column({type: 'varchar', length: 100, nullable: true})
|
|
21
|
+
app_code: string;
|
|
22
|
+
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Body,
|
|
3
|
-
Controller,
|
|
4
|
-
HttpStatus,
|
|
5
|
-
Inject,
|
|
6
|
-
Post,
|
|
7
|
-
Res,
|
|
8
|
-
ValidationPipe,
|
|
9
|
-
} from '@nestjs/common';
|
|
10
|
-
import { UserService } from '../service/user.service';
|
|
11
|
-
import { CreateUserDto } from '../dto/create-user.dto';
|
|
12
|
-
import { Response } from 'express';
|
|
13
|
-
|
|
14
|
-
@Controller('user')
|
|
15
|
-
export class UserController {
|
|
16
|
-
constructor(
|
|
17
|
-
@Inject('UserService') private readonly userService: UserService,
|
|
18
|
-
) {}
|
|
19
|
-
|
|
20
|
-
@Post('signup')
|
|
21
|
-
async signup(
|
|
22
|
-
@Body(new ValidationPipe()) createUserDto: CreateUserDto,
|
|
23
|
-
@Res() res: Response,
|
|
24
|
-
) {
|
|
25
|
-
const result = await this.userService.createEntity(createUserDto, null);
|
|
26
|
-
res.status(HttpStatus.OK).json(result);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
Body,
|
|
3
|
+
Controller,
|
|
4
|
+
HttpStatus,
|
|
5
|
+
Inject,
|
|
6
|
+
Post,
|
|
7
|
+
Res,
|
|
8
|
+
ValidationPipe,
|
|
9
|
+
} from '@nestjs/common';
|
|
10
|
+
import { UserService } from '../service/user.service';
|
|
11
|
+
import { CreateUserDto } from '../dto/create-user.dto';
|
|
12
|
+
import { Response } from 'express';
|
|
13
|
+
|
|
14
|
+
@Controller('user')
|
|
15
|
+
export class UserController {
|
|
16
|
+
constructor(
|
|
17
|
+
@Inject('UserService') private readonly userService: UserService,
|
|
18
|
+
) {}
|
|
19
|
+
|
|
20
|
+
@Post('signup')
|
|
21
|
+
async signup(
|
|
22
|
+
@Body(new ValidationPipe()) createUserDto: CreateUserDto,
|
|
23
|
+
@Res() res: Response,
|
|
24
|
+
) {
|
|
25
|
+
const result = await this.userService.createEntity(createUserDto, null);
|
|
26
|
+
res.status(HttpStatus.OK).json(result);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PartialType } from '@nestjs/mapped-types';
|
|
2
|
-
import { CreateUserDto } from './create-user.dto';
|
|
3
|
-
|
|
4
|
-
export class UpdateUserDto extends PartialType(CreateUserDto) {}
|
|
1
|
+
import { PartialType } from '@nestjs/mapped-types';
|
|
2
|
+
import { CreateUserDto } from './create-user.dto';
|
|
3
|
+
|
|
4
|
+
export class UpdateUserDto extends PartialType(CreateUserDto) {}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BaseEntity } from '../../meta/entity/base-entity.entity';
|
|
2
2
|
import { ENTITYTYPE_ROLE } from '../../../constant/global.constant';
|
|
3
3
|
import { Column, Entity } from 'typeorm';
|
|
4
|
+
import { Exclude } from 'class-transformer';
|
|
4
5
|
|
|
5
6
|
@Entity({ name: 'cr_role' })
|
|
6
7
|
export class Role extends BaseEntity {
|
|
@@ -17,4 +18,7 @@ export class Role extends BaseEntity {
|
|
|
17
18
|
|
|
18
19
|
@Column({ type: 'varchar', length: 250, nullable: true })
|
|
19
20
|
description: string;
|
|
21
|
+
|
|
22
|
+
@Exclude()
|
|
23
|
+
copy_from_role_id: number;
|
|
20
24
|
}
|
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
|
|
2
|
-
|
|
3
|
-
@Entity({ name: 'cr_user_session' })
|
|
4
|
-
export class UserSession {
|
|
5
|
-
@PrimaryGeneratedColumn()
|
|
6
|
-
id: number;
|
|
7
|
-
|
|
8
|
-
@Column({
|
|
9
|
-
name: 'is_session_loggedout',
|
|
10
|
-
nullable: true,
|
|
11
|
-
type: 'int',
|
|
12
|
-
})
|
|
13
|
-
is_session_loggedout: number;
|
|
14
|
-
|
|
15
|
-
@Column({
|
|
16
|
-
name: 'login_id',
|
|
17
|
-
nullable: true,
|
|
18
|
-
length: 50,
|
|
19
|
-
})
|
|
20
|
-
login_id: string;
|
|
21
|
-
|
|
22
|
-
@Column({
|
|
23
|
-
name: 'login_time',
|
|
24
|
-
nullable: true,
|
|
25
|
-
})
|
|
26
|
-
login_time: Date;
|
|
27
|
-
|
|
28
|
-
@Column({
|
|
29
|
-
name: 'logout_time',
|
|
30
|
-
nullable: true,
|
|
31
|
-
})
|
|
32
|
-
logout_time: Date;
|
|
33
|
-
|
|
34
|
-
@Column({
|
|
35
|
-
name: 'session_key',
|
|
36
|
-
nullable: true,
|
|
37
|
-
length: 100,
|
|
38
|
-
})
|
|
39
|
-
session_key: string;
|
|
40
|
-
|
|
41
|
-
@Column({
|
|
42
|
-
name: 'user_id',
|
|
43
|
-
nullable: true,
|
|
44
|
-
type: 'bigint',
|
|
45
|
-
})
|
|
46
|
-
user_id: number;
|
|
47
|
-
|
|
48
|
-
@Column({
|
|
49
|
-
name: 'access_token',
|
|
50
|
-
nullable: true,
|
|
51
|
-
type: 'varchar',
|
|
52
|
-
length: 5000,
|
|
53
|
-
})
|
|
54
|
-
access_token: string;
|
|
55
|
-
|
|
56
|
-
@Column({
|
|
57
|
-
name: 'expiry_date',
|
|
58
|
-
nullable: true,
|
|
59
|
-
})
|
|
60
|
-
expiry_date: Date;
|
|
61
|
-
}
|
|
1
|
+
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
|
|
2
|
+
|
|
3
|
+
@Entity({ name: 'cr_user_session' })
|
|
4
|
+
export class UserSession {
|
|
5
|
+
@PrimaryGeneratedColumn()
|
|
6
|
+
id: number;
|
|
7
|
+
|
|
8
|
+
@Column({
|
|
9
|
+
name: 'is_session_loggedout',
|
|
10
|
+
nullable: true,
|
|
11
|
+
type: 'int',
|
|
12
|
+
})
|
|
13
|
+
is_session_loggedout: number;
|
|
14
|
+
|
|
15
|
+
@Column({
|
|
16
|
+
name: 'login_id',
|
|
17
|
+
nullable: true,
|
|
18
|
+
length: 50,
|
|
19
|
+
})
|
|
20
|
+
login_id: string;
|
|
21
|
+
|
|
22
|
+
@Column({
|
|
23
|
+
name: 'login_time',
|
|
24
|
+
nullable: true,
|
|
25
|
+
})
|
|
26
|
+
login_time: Date;
|
|
27
|
+
|
|
28
|
+
@Column({
|
|
29
|
+
name: 'logout_time',
|
|
30
|
+
nullable: true,
|
|
31
|
+
})
|
|
32
|
+
logout_time: Date;
|
|
33
|
+
|
|
34
|
+
@Column({
|
|
35
|
+
name: 'session_key',
|
|
36
|
+
nullable: true,
|
|
37
|
+
length: 100,
|
|
38
|
+
})
|
|
39
|
+
session_key: string;
|
|
40
|
+
|
|
41
|
+
@Column({
|
|
42
|
+
name: 'user_id',
|
|
43
|
+
nullable: true,
|
|
44
|
+
type: 'bigint',
|
|
45
|
+
})
|
|
46
|
+
user_id: number;
|
|
47
|
+
|
|
48
|
+
@Column({
|
|
49
|
+
name: 'access_token',
|
|
50
|
+
nullable: true,
|
|
51
|
+
type: 'varchar',
|
|
52
|
+
length: 5000,
|
|
53
|
+
})
|
|
54
|
+
access_token: string;
|
|
55
|
+
|
|
56
|
+
@Column({
|
|
57
|
+
name: 'expiry_date',
|
|
58
|
+
nullable: true,
|
|
59
|
+
})
|
|
60
|
+
expiry_date: Date;
|
|
61
|
+
}
|