@hedhog/admin 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +3 -0
- package/dist/{file/src/migrations/index.d.ts → migrations/migrate-01.d.ts} +1 -1
- package/dist/migrations/migrate-01.d.ts.map +1 -0
- package/dist/migrations/{1726795702341-migrate.js → migrate-01.js} +36 -36
- package/dist/migrations/migrate-01.js.map +1 -0
- package/dist/{setting/src/migrations/index.d.ts → migrations/migrate-02.d.ts} +1 -1
- package/dist/migrations/migrate-02.d.ts.map +1 -0
- package/dist/migrations/{1726795734665-migrate.js → migrate-02.js} +15 -15
- package/dist/migrations/migrate-02.js.map +1 -0
- package/dist/migrations/{1726795828359-migrate.d.ts → migrate-03.d.ts} +3 -2
- package/dist/migrations/migrate-03.d.ts.map +1 -0
- package/dist/migrations/migrate-03.js +101 -0
- package/dist/migrations/migrate-03.js.map +1 -0
- package/dist/migrations/migrate-04.d.ts +6 -0
- package/dist/migrations/migrate-04.d.ts.map +1 -0
- package/dist/migrations/{1726795828359-migrate.js → migrate-04.js} +4 -4
- package/dist/migrations/migrate-04.js.map +1 -0
- package/package.json +31 -29
- package/src/migrations/migrate-01.ts +107 -0
- package/src/migrations/migrate-02.ts +40 -0
- package/src/migrations/{1726795818403-migrate.ts → migrate-03.ts} +49 -49
- package/src/migrations/{1726795828359-migrate.ts → migrate-04.ts} +1 -1
- package/dist/file/src/dto/delete.dto.d.ts +0 -4
- package/dist/file/src/dto/delete.dto.d.ts.map +0 -1
- package/dist/file/src/dto/delete.dto.js +0 -23
- package/dist/file/src/dto/delete.dto.js.map +0 -1
- package/dist/file/src/file.module.d.ts +0 -3
- package/dist/file/src/file.module.d.ts.map +0 -1
- package/dist/file/src/file.module.js +0 -29
- package/dist/file/src/file.module.js.map +0 -1
- package/dist/file/src/file.service.d.ts +0 -12
- package/dist/file/src/file.service.d.ts.map +0 -1
- package/dist/file/src/file.service.js +0 -59
- package/dist/file/src/file.service.js.map +0 -1
- package/dist/file/src/migrations/index.d.ts.map +0 -1
- package/dist/file/src/migrations/index.js +0 -137
- package/dist/file/src/migrations/index.js.map +0 -1
- package/dist/mail/src/enums/mail-configuration-type.enum.d.ts +0 -6
- package/dist/mail/src/enums/mail-configuration-type.enum.d.ts.map +0 -1
- package/dist/mail/src/enums/mail-configuration-type.enum.js +0 -10
- package/dist/mail/src/enums/mail-configuration-type.enum.js.map +0 -1
- package/dist/mail/src/interfaces/index.d.ts +0 -3
- package/dist/mail/src/interfaces/index.d.ts.map +0 -1
- package/dist/mail/src/interfaces/index.js +0 -19
- package/dist/mail/src/interfaces/index.js.map +0 -1
- package/dist/mail/src/interfaces/mail-module-options.interface.d.ts +0 -32
- package/dist/mail/src/interfaces/mail-module-options.interface.d.ts.map +0 -1
- package/dist/mail/src/interfaces/mail-module-options.interface.js +0 -3
- package/dist/mail/src/interfaces/mail-module-options.interface.js.map +0 -1
- package/dist/mail/src/interfaces/mail-type.d.ts +0 -13
- package/dist/mail/src/interfaces/mail-type.d.ts.map +0 -1
- package/dist/mail/src/interfaces/mail-type.js +0 -3
- package/dist/mail/src/interfaces/mail-type.js.map +0 -1
- package/dist/mail/src/mail.consts.d.ts +0 -17
- package/dist/mail/src/mail.consts.d.ts.map +0 -1
- package/dist/mail/src/mail.consts.js +0 -5
- package/dist/mail/src/mail.consts.js.map +0 -1
- package/dist/mail/src/mail.module.d.ts +0 -8
- package/dist/mail/src/mail.module.d.ts.map +0 -1
- package/dist/mail/src/mail.module.js +0 -51
- package/dist/mail/src/mail.module.js.map +0 -1
- package/dist/mail/src/mail.service.d.ts +0 -14
- package/dist/mail/src/mail.service.d.ts.map +0 -1
- package/dist/mail/src/mail.service.js +0 -281
- package/dist/mail/src/mail.service.js.map +0 -1
- package/dist/mail/src/mail.service.spec.d.ts +0 -2
- package/dist/mail/src/mail.service.spec.d.ts.map +0 -1
- package/dist/mail/src/mail.service.spec.js +0 -17
- package/dist/mail/src/mail.service.spec.js.map +0 -1
- package/dist/migrations/1726795702341-migrate.d.ts +0 -6
- package/dist/migrations/1726795702341-migrate.d.ts.map +0 -1
- package/dist/migrations/1726795702341-migrate.js.map +0 -1
- package/dist/migrations/1726795734665-migrate.d.ts +0 -6
- package/dist/migrations/1726795734665-migrate.d.ts.map +0 -1
- package/dist/migrations/1726795734665-migrate.js.map +0 -1
- package/dist/migrations/1726795818403-migrate.d.ts +0 -7
- package/dist/migrations/1726795818403-migrate.d.ts.map +0 -1
- package/dist/migrations/1726795818403-migrate.js +0 -101
- package/dist/migrations/1726795818403-migrate.js.map +0 -1
- package/dist/migrations/1726795828359-migrate.d.ts.map +0 -1
- package/dist/migrations/1726795828359-migrate.js.map +0 -1
- package/dist/setting/src/dto/create.dto.d.ts +0 -4
- package/dist/setting/src/dto/create.dto.d.ts.map +0 -1
- package/dist/setting/src/dto/create.dto.js +0 -22
- package/dist/setting/src/dto/create.dto.js.map +0 -1
- package/dist/setting/src/dto/delete.dto.d.ts +0 -4
- package/dist/setting/src/dto/delete.dto.d.ts.map +0 -1
- package/dist/setting/src/dto/delete.dto.js +0 -23
- package/dist/setting/src/dto/delete.dto.js.map +0 -1
- package/dist/setting/src/dto/update.dto.d.ts +0 -4
- package/dist/setting/src/dto/update.dto.d.ts.map +0 -1
- package/dist/setting/src/dto/update.dto.js +0 -8
- package/dist/setting/src/dto/update.dto.js.map +0 -1
- package/dist/setting/src/migrations/index.d.ts.map +0 -1
- package/dist/setting/src/migrations/index.js +0 -67
- package/dist/setting/src/migrations/index.js.map +0 -1
- package/dist/setting/src/settings.controller.d.ts +0 -14
- package/dist/setting/src/settings.controller.d.ts.map +0 -1
- package/dist/setting/src/settings.controller.js +0 -94
- package/dist/setting/src/settings.controller.js.map +0 -1
- package/dist/setting/src/settings.module.d.ts +0 -3
- package/dist/setting/src/settings.module.d.ts.map +0 -1
- package/dist/setting/src/settings.module.js +0 -31
- package/dist/setting/src/settings.module.js.map +0 -1
- package/dist/setting/src/settings.service.d.ts +0 -19
- package/dist/setting/src/settings.service.d.ts.map +0 -1
- package/dist/setting/src/settings.service.js +0 -70
- package/dist/setting/src/settings.service.js.map +0 -1
- package/src/migrations/1726795702341-migrate.ts +0 -107
- package/src/migrations/1726795734665-migrate.ts +0 -40
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"1726795828359-migrate.js","sourceRoot":"","sources":["../../src/migrations/1726795828359-migrate.ts"],"names":[],"mappings":";;;AAAA,yCAA0D;AAE1D,qCAMiB;AAEjB,MAAa,oBAAoB;IAC/B,KAAK,CAAC,EAAE,CAAC,WAAwB;QAC/B,MAAM,WAAW,CAAC,WAAW,CAC3B,IAAI,eAAK,CAAC;YACR,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,IAAA,gBAAQ,GAAE;gBACV;oBACE,IAAI,EAAE,KAAK;oBACX,IAAI,EAAE,SAAS;iBAChB;gBACD;oBACE,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC;iBACnE;gBACD,IAAA,uBAAe,GAAE;gBACjB,IAAA,uBAAe,EAAC,YAAY,CAAC;aAC9B;SACF,CAAC,CACH,CAAC;QAEF,MAAM,WAAW,CAAC,sBAAsB,CACtC,QAAQ,EACR,IAAI,qBAAW,CAAC;YACd,WAAW,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC;YAC9B,IAAI,EAAE,eAAe;SACtB,CAAC,CACH,CAAC;QAEF,MAAM,WAAW,CAAC,WAAW,CAC3B,IAAI,eAAK,CAAC;YACR,IAAI,EAAE,OAAO;YACb,OAAO,EAAE;gBACP,IAAA,gBAAQ,GAAE;gBACV;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,SAAS;oBACf,UAAU,EAAE,KAAK;iBAClB;gBACD;oBACE,IAAI,EAAE,aAAa;oBACnB,IAAI,EAAE,SAAS;iBAChB;gBACD,IAAA,uBAAe,GAAE;gBACjB,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rB,mBAAmB;SACpB,EAAE,CAAC;YACF,MAAM,WAAW,CAAC,OAAO;iBACtB,kBAAkB,EAAE;iBACpB,MAAM,EAAE;iBACR,IAAI,CAAC,SAAS,CAAC;iBACf,KAAK,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,CAAC;iBAC/B,OAAO,EAAE,CAAC;QACf,CAAC;QAED,MAAM,WAAW,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;QAC3C,MAAM,WAAW,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;QAC5C,MAAM,WAAW,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QAC1C,MAAM,WAAW,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QAC1C,MAAM,WAAW,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACrC,MAAM,WAAW,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;QAC7C,MAAM,WAAW,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IACxC,CAAC;CACF;AAljBD,oDAkjBC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"create.dto.d.ts","sourceRoot":"","sources":["../../../../src/setting/src/dto/create.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,SAAS;IAGpB,IAAI,EAAE,MAAM,CAAC;CACd"}
|
@@ -1,22 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
-
};
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
|
-
};
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
exports.CreateDTO = void 0;
|
13
|
-
const class_validator_1 = require("class-validator");
|
14
|
-
class CreateDTO {
|
15
|
-
}
|
16
|
-
exports.CreateDTO = CreateDTO;
|
17
|
-
__decorate([
|
18
|
-
(0, class_validator_1.IsString)({ message: 'O nome deve ser uma string' }),
|
19
|
-
(0, class_validator_1.IsNotEmpty)({ message: 'O nome é obrigatório.' }),
|
20
|
-
__metadata("design:type", String)
|
21
|
-
], CreateDTO.prototype, "name", void 0);
|
22
|
-
//# sourceMappingURL=create.dto.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"create.dto.js","sourceRoot":"","sources":["../../../../src/setting/src/dto/create.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuD;AAEvD,MAAa,SAAS;CAIrB;AAJD,8BAIC;AADC;IAFC,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,4BAA4B,EAAE,CAAC;IACnD,IAAA,4BAAU,EAAC,EAAE,OAAO,EAAE,uBAAuB,EAAE,CAAC;;uCACpC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"delete.dto.d.ts","sourceRoot":"","sources":["../../../../src/setting/src/dto/delete.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,SAAS;IAIpB,GAAG,EAAE,MAAM,EAAE,CAAC;CACf"}
|
@@ -1,23 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
-
};
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
|
-
};
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
exports.DeleteDTO = void 0;
|
13
|
-
const class_validator_1 = require("class-validator");
|
14
|
-
class DeleteDTO {
|
15
|
-
}
|
16
|
-
exports.DeleteDTO = DeleteDTO;
|
17
|
-
__decorate([
|
18
|
-
(0, class_validator_1.IsArray)(),
|
19
|
-
(0, class_validator_1.ArrayMinSize)(1),
|
20
|
-
(0, class_validator_1.IsInt)({ each: true }),
|
21
|
-
__metadata("design:type", Array)
|
22
|
-
], DeleteDTO.prototype, "ids", void 0);
|
23
|
-
//# sourceMappingURL=delete.dto.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"delete.dto.js","sourceRoot":"","sources":["../../../../src/setting/src/dto/delete.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA+D;AAE/D,MAAa,SAAS;CAKrB;AALD,8BAKC;AADC;IAHC,IAAA,yBAAO,GAAE;IACT,IAAA,8BAAY,EAAC,CAAC,CAAC;IACf,IAAA,uBAAK,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;sCACR"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"update.dto.d.ts","sourceRoot":"","sources":["../../../../src/setting/src/dto/update.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,qBAAa,SAAU,SAAQ,SAAS;CAAG"}
|
@@ -1,8 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.UpdateDTO = void 0;
|
4
|
-
const create_dto_1 = require("./create.dto");
|
5
|
-
class UpdateDTO extends create_dto_1.CreateDTO {
|
6
|
-
}
|
7
|
-
exports.UpdateDTO = UpdateDTO;
|
8
|
-
//# sourceMappingURL=update.dto.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"update.dto.js","sourceRoot":"","sources":["../../../../src/setting/src/dto/update.dto.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AAEzC,MAAa,SAAU,SAAQ,sBAAS;CAAG;AAA3C,8BAA2C"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/setting/src/migrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,WAAW,EAGZ,MAAM,SAAS,CAAC;AAGjB,qBAAa,OAAQ,YAAW,kBAAkB;IACnC,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAgE3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAI3D"}
|
@@ -1,67 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.Migrate = void 0;
|
4
|
-
const typeorm_1 = require("typeorm");
|
5
|
-
const utils_1 = require("@hedhog/utils");
|
6
|
-
class Migrate {
|
7
|
-
async up(queryRunner) {
|
8
|
-
await queryRunner.createTable(new typeorm_1.Table({
|
9
|
-
name: 'settings',
|
10
|
-
columns: [
|
11
|
-
(0, utils_1.idColumn)(),
|
12
|
-
{
|
13
|
-
name: 'name',
|
14
|
-
type: 'varchar',
|
15
|
-
},
|
16
|
-
(0, utils_1.timestampColumn)(),
|
17
|
-
(0, utils_1.timestampColumn)('updated_at'),
|
18
|
-
],
|
19
|
-
}));
|
20
|
-
await queryRunner.createTable(new typeorm_1.Table({
|
21
|
-
name: 'setting_values',
|
22
|
-
columns: [
|
23
|
-
(0, utils_1.idColumn)(),
|
24
|
-
{
|
25
|
-
name: 'value',
|
26
|
-
type: 'varchar',
|
27
|
-
length: '1023',
|
28
|
-
},
|
29
|
-
{
|
30
|
-
name: 'name',
|
31
|
-
type: 'varchar',
|
32
|
-
isUnique: true,
|
33
|
-
},
|
34
|
-
{
|
35
|
-
name: 'description',
|
36
|
-
type: 'varchar',
|
37
|
-
isNullable: true,
|
38
|
-
},
|
39
|
-
{
|
40
|
-
name: 'label',
|
41
|
-
type: 'varchar',
|
42
|
-
isNullable: true,
|
43
|
-
},
|
44
|
-
{
|
45
|
-
name: 'setting_id',
|
46
|
-
type: 'int',
|
47
|
-
unsigned: true,
|
48
|
-
},
|
49
|
-
(0, utils_1.timestampColumn)(),
|
50
|
-
(0, utils_1.timestampColumn)('updated_at'),
|
51
|
-
],
|
52
|
-
}));
|
53
|
-
// Criação das foreign keys
|
54
|
-
await queryRunner.createForeignKey('setting_values', new typeorm_1.TableForeignKey({
|
55
|
-
columnNames: ['setting_id'],
|
56
|
-
referencedColumnNames: ['id'],
|
57
|
-
referencedTableName: 'settings',
|
58
|
-
onDelete: 'CASCADE',
|
59
|
-
}));
|
60
|
-
}
|
61
|
-
async down(queryRunner) {
|
62
|
-
await queryRunner.dropTable('setting_values');
|
63
|
-
await queryRunner.dropTable('settings');
|
64
|
-
}
|
65
|
-
}
|
66
|
-
exports.Migrate = Migrate;
|
67
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/setting/src/migrations/index.ts"],"names":[],"mappings":";;;AAAA,qCAKiB;AACjB,yCAA0D;AAE1D,MAAa,OAAO;IACX,KAAK,CAAC,EAAE,CAAC,WAAwB;QACtC,MAAM,WAAW,CAAC,WAAW,CAC3B,IAAI,eAAK,CAAC;YACR,IAAI,EAAE,UAAU;YAChB,OAAO,EAAE;gBACP,IAAA,gBAAQ,GAAE;gBACV;oBACE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 -1,14 +0,0 @@
|
|
1
|
-
import { CreateDTO } from './dto/create.dto';
|
2
|
-
import { DeleteDTO } from './dto/delete.dto';
|
3
|
-
import { UpdateDTO } from './dto/update.dto';
|
4
|
-
import { SettingsService } from './settings.service';
|
5
|
-
export declare class SettingsController {
|
6
|
-
private readonly settingsService;
|
7
|
-
constructor(settingsService: SettingsService);
|
8
|
-
getSettings(paginationParams: any): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
9
|
-
show(settingId: number): Promise<any>;
|
10
|
-
create(data: CreateDTO): Promise<any>;
|
11
|
-
update(settingId: number, data: UpdateDTO): Promise<any>;
|
12
|
-
delete(data: DeleteDTO): Promise<any>;
|
13
|
-
}
|
14
|
-
//# sourceMappingURL=settings.controller.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"settings.controller.d.ts","sourceRoot":"","sources":["../../../src/setting/src/settings.controller.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,qBAEa,kBAAkB;IAG3B,OAAO,CAAC,QAAQ,CAAC,eAAe;gBAAf,eAAe,EAAE,eAAe;IAK7C,WAAW,CAAe,gBAAgB,KAAA;IAM1C,IAAI,CAAmC,SAAS,EAAE,MAAM;IAM9D,MAAM,CAAS,IAAI,EAAE,SAAS;IAMxB,MAAM,CACwB,SAAS,EAAE,MAAM,EAC3C,IAAI,EAAE,SAAS;IAUnB,MAAM,CAAS,IAAI,EAAE,SAAS;CAGrC"}
|
@@ -1,94 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
-
};
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
|
-
};
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
13
|
-
};
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
-
exports.SettingsController = void 0;
|
16
|
-
const __1 = require("../../");
|
17
|
-
const pagination_1 = require("@hedhog/pagination");
|
18
|
-
const common_1 = require("@nestjs/common");
|
19
|
-
const create_dto_1 = require("./dto/create.dto");
|
20
|
-
const delete_dto_1 = require("./dto/delete.dto");
|
21
|
-
const update_dto_1 = require("./dto/update.dto");
|
22
|
-
const settings_service_1 = require("./settings.service");
|
23
|
-
let SettingsController = class SettingsController {
|
24
|
-
constructor(settingsService) {
|
25
|
-
this.settingsService = settingsService;
|
26
|
-
}
|
27
|
-
async getSettings(paginationParams) {
|
28
|
-
return this.settingsService.getSettings(paginationParams);
|
29
|
-
}
|
30
|
-
async show(settingId) {
|
31
|
-
return this.settingsService.get(settingId);
|
32
|
-
}
|
33
|
-
create(data) {
|
34
|
-
return this.settingsService.create(data);
|
35
|
-
}
|
36
|
-
async update(settingId, data) {
|
37
|
-
return this.settingsService.update({
|
38
|
-
id: settingId,
|
39
|
-
data,
|
40
|
-
});
|
41
|
-
}
|
42
|
-
async delete(data) {
|
43
|
-
return this.settingsService.delete(data);
|
44
|
-
}
|
45
|
-
};
|
46
|
-
exports.SettingsController = SettingsController;
|
47
|
-
__decorate([
|
48
|
-
(0, common_1.UseGuards)(__1.AuthGuard),
|
49
|
-
(0, common_1.Get)(),
|
50
|
-
__param(0, (0, pagination_1.Pagination)()),
|
51
|
-
__metadata("design:type", Function),
|
52
|
-
__metadata("design:paramtypes", [Object]),
|
53
|
-
__metadata("design:returntype", Promise)
|
54
|
-
], SettingsController.prototype, "getSettings", null);
|
55
|
-
__decorate([
|
56
|
-
(0, common_1.UseGuards)(__1.AuthGuard),
|
57
|
-
(0, common_1.Get)(':settingId'),
|
58
|
-
__param(0, (0, common_1.Param)('settingId', common_1.ParseIntPipe)),
|
59
|
-
__metadata("design:type", Function),
|
60
|
-
__metadata("design:paramtypes", [Number]),
|
61
|
-
__metadata("design:returntype", Promise)
|
62
|
-
], SettingsController.prototype, "show", null);
|
63
|
-
__decorate([
|
64
|
-
(0, common_1.UseGuards)(__1.AuthGuard),
|
65
|
-
(0, common_1.Post)(),
|
66
|
-
__param(0, (0, common_1.Body)()),
|
67
|
-
__metadata("design:type", Function),
|
68
|
-
__metadata("design:paramtypes", [create_dto_1.CreateDTO]),
|
69
|
-
__metadata("design:returntype", void 0)
|
70
|
-
], SettingsController.prototype, "create", null);
|
71
|
-
__decorate([
|
72
|
-
(0, common_1.UseGuards)(__1.AuthGuard),
|
73
|
-
(0, common_1.Patch)(':settingId'),
|
74
|
-
__param(0, (0, common_1.Param)('settingId', common_1.ParseIntPipe)),
|
75
|
-
__param(1, (0, common_1.Body)()),
|
76
|
-
__metadata("design:type", Function),
|
77
|
-
__metadata("design:paramtypes", [Number, update_dto_1.UpdateDTO]),
|
78
|
-
__metadata("design:returntype", Promise)
|
79
|
-
], SettingsController.prototype, "update", null);
|
80
|
-
__decorate([
|
81
|
-
(0, common_1.UseGuards)(__1.AuthGuard),
|
82
|
-
(0, common_1.Delete)(),
|
83
|
-
__param(0, (0, common_1.Body)()),
|
84
|
-
__metadata("design:type", Function),
|
85
|
-
__metadata("design:paramtypes", [delete_dto_1.DeleteDTO]),
|
86
|
-
__metadata("design:returntype", Promise)
|
87
|
-
], SettingsController.prototype, "delete", null);
|
88
|
-
exports.SettingsController = SettingsController = __decorate([
|
89
|
-
(0, __1.Permission)(),
|
90
|
-
(0, common_1.Controller)('settings'),
|
91
|
-
__param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => settings_service_1.SettingsService))),
|
92
|
-
__metadata("design:paramtypes", [settings_service_1.SettingsService])
|
93
|
-
], SettingsController);
|
94
|
-
//# sourceMappingURL=settings.controller.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"settings.controller.js","sourceRoot":"","sources":["../../../src/setting/src/settings.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,8BAA+C;AAC/C,mDAAgD;AAChD,2CAYwB;AACxB,iDAA6C;AAC7C,iDAA6C;AAC7C,iDAA6C;AAC7C,yDAAqD;AAI9C,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC7B,YAEmB,eAAgC;QAAhC,oBAAe,GAAf,eAAe,CAAiB;IAChD,CAAC;IAIE,AAAN,KAAK,CAAC,WAAW,CAAe,gBAAgB;QAC9C,OAAO,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;IAC5D,CAAC;IAIK,AAAN,KAAK,CAAC,IAAI,CAAmC,SAAiB;QAC5D,OAAO,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC7C,CAAC;IAID,MAAM,CAAS,IAAe;QAC5B,OAAO,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;IAIK,AAAN,KAAK,CAAC,MAAM,CACwB,SAAiB,EAC3C,IAAe;QAEvB,OAAO,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC;YACjC,EAAE,EAAE,SAAS;YACb,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAIK,AAAN,KAAK,CAAC,MAAM,CAAS,IAAe;QAClC,OAAO,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;CACF,CAAA;AAzCY,gDAAkB;AAQvB;IAFL,IAAA,kBAAS,EAAC,aAAS,CAAC;IACpB,IAAA,YAAG,GAAE;IACa,WAAA,IAAA,uBAAU,GAAE,CAAA;;;;qDAE9B;AAIK;IAFL,IAAA,kBAAS,EAAC,aAAS,CAAC;IACpB,IAAA,YAAG,EAAC,YAAY,CAAC;IACN,WAAA,IAAA,cAAK,EAAC,WAAW,EAAE,qBAAY,CAAC,CAAA;;;;8CAE3C;AAID;IAFC,IAAA,kBAAS,EAAC,aAAS,CAAC;IACpB,IAAA,aAAI,GAAE;IACC,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,sBAAS;;gDAE7B;AAIK;IAFL,IAAA,kBAAS,EAAC,aAAS,CAAC;IACpB,IAAA,cAAK,EAAC,YAAY,CAAC;IAEjB,WAAA,IAAA,cAAK,EAAC,WAAW,EAAE,qBAAY,CAAC,CAAA;IAChC,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAO,sBAAS;;gDAMxB;AAIK;IAFL,IAAA,kBAAS,EAAC,aAAS,CAAC;IACpB,IAAA,eAAM,GAAE;IACK,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,sBAAS;;gDAEnC;6BAxCU,kBAAkB;IAF9B,IAAA,cAAU,GAAE;IACZ,IAAA,mBAAU,EAAC,UAAU,CAAC;IAGlB,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,kCAAe,CAAC,CAAC,CAAA;qCACR,kCAAe;GAHxC,kBAAkB,CAyC9B"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"settings.module.d.ts","sourceRoot":"","sources":["../../../src/setting/src/settings.module.ts"],"names":[],"mappings":"AAOA,qBAUa,aAAa;CAAG"}
|
@@ -1,31 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
-
};
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
9
|
-
exports.SettingModule = void 0;
|
10
|
-
const __1 = require("../../");
|
11
|
-
const pagination_1 = require("@hedhog/pagination");
|
12
|
-
const prisma_1 = require("@hedhog/prisma");
|
13
|
-
const common_1 = require("@nestjs/common");
|
14
|
-
const settings_controller_1 = require("./settings.controller");
|
15
|
-
const settings_service_1 = require("./settings.service");
|
16
|
-
let SettingModule = class SettingModule {
|
17
|
-
};
|
18
|
-
exports.SettingModule = SettingModule;
|
19
|
-
exports.SettingModule = SettingModule = __decorate([
|
20
|
-
(0, common_1.Module)({
|
21
|
-
providers: [settings_service_1.SettingsService],
|
22
|
-
exports: [settings_service_1.SettingsService],
|
23
|
-
controllers: [settings_controller_1.SettingsController],
|
24
|
-
imports: [
|
25
|
-
(0, common_1.forwardRef)(() => __1.AuthModule),
|
26
|
-
(0, common_1.forwardRef)(() => prisma_1.PrismaModule),
|
27
|
-
(0, common_1.forwardRef)(() => pagination_1.PaginationModule),
|
28
|
-
],
|
29
|
-
})
|
30
|
-
], SettingModule);
|
31
|
-
//# sourceMappingURL=settings.module.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"settings.module.js","sourceRoot":"","sources":["../../../src/setting/src/settings.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,8BAAoC;AACpC,mDAAsD;AACtD,2CAA8C;AAC9C,2CAAoD;AACpD,+DAA2D;AAC3D,yDAAqD;AAY9C,IAAM,aAAa,GAAnB,MAAM,aAAa;CAAG,CAAA;AAAhB,sCAAa;wBAAb,aAAa;IAVzB,IAAA,eAAM,EAAC;QACN,SAAS,EAAE,CAAC,kCAAe,CAAC;QAC5B,OAAO,EAAE,CAAC,kCAAe,CAAC;QAC1B,WAAW,EAAE,CAAC,wCAAkB,CAAC;QACjC,OAAO,EAAE;YACP,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,cAAU,CAAC;YAC5B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,qBAAY,CAAC;YAC9B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,6BAAgB,CAAC;SACnC;KACF,CAAC;GACW,aAAa,CAAG"}
|
@@ -1,19 +0,0 @@
|
|
1
|
-
import { PaginationDTO, PaginationService } from '@hedhog/pagination';
|
2
|
-
import { PrismaService } from '@hedhog/prisma';
|
3
|
-
import { CreateDTO } from './dto/create.dto';
|
4
|
-
import { DeleteDTO } from './dto/delete.dto';
|
5
|
-
import { UpdateDTO } from './dto/update.dto';
|
6
|
-
export declare class SettingsService {
|
7
|
-
private readonly prismaService;
|
8
|
-
private readonly paginationService;
|
9
|
-
constructor(prismaService: PrismaService, paginationService: PaginationService);
|
10
|
-
getSettings(paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
11
|
-
get(settingId: number): Promise<any>;
|
12
|
-
create({ name }: CreateDTO): Promise<any>;
|
13
|
-
update({ id, data }: {
|
14
|
-
id: number;
|
15
|
-
data: UpdateDTO;
|
16
|
-
}): Promise<any>;
|
17
|
-
delete({ ids }: DeleteDTO): Promise<any>;
|
18
|
-
}
|
19
|
-
//# sourceMappingURL=settings.service.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"settings.service.d.ts","sourceRoot":"","sources":["../../../src/setting/src/settings.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAO/C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,qBACa,eAAe;IAGxB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAFjB,aAAa,EAAE,aAAa,EAE5B,iBAAiB,EAAE,iBAAiB;IAGjD,WAAW,CAAC,gBAAgB,EAAE,aAAa;IAmB3C,GAAG,CAAC,SAAS,EAAE,MAAM;IAMrB,MAAM,CAAC,EAAE,IAAI,EAAE,EAAE,SAAS;IAM1B,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,SAAS,CAAA;KAAE;IAOpD,MAAM,CAAC,EAAE,GAAG,EAAE,EAAE,SAAS;CAehC"}
|
@@ -1,70 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
-
};
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
|
-
};
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
13
|
-
};
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
-
exports.SettingsService = void 0;
|
16
|
-
const pagination_1 = require("@hedhog/pagination");
|
17
|
-
const prisma_1 = require("@hedhog/prisma");
|
18
|
-
const common_1 = require("@nestjs/common");
|
19
|
-
let SettingsService = class SettingsService {
|
20
|
-
constructor(prismaService, paginationService) {
|
21
|
-
this.prismaService = prismaService;
|
22
|
-
this.paginationService = paginationService;
|
23
|
-
}
|
24
|
-
async getSettings(paginationParams) {
|
25
|
-
const fields = ['name'];
|
26
|
-
const OR = this.prismaService.createInsensitiveSearch(fields, paginationParams);
|
27
|
-
return this.paginationService.paginate(this.prismaService.settings, paginationParams, {
|
28
|
-
where: {
|
29
|
-
OR,
|
30
|
-
},
|
31
|
-
});
|
32
|
-
}
|
33
|
-
async get(settingId) {
|
34
|
-
return this.prismaService.settings.findUnique({
|
35
|
-
where: { id: settingId },
|
36
|
-
});
|
37
|
-
}
|
38
|
-
async create({ name }) {
|
39
|
-
return this.prismaService.settings.create({
|
40
|
-
data: { name },
|
41
|
-
});
|
42
|
-
}
|
43
|
-
async update({ id, data }) {
|
44
|
-
return this.prismaService.settings.update({
|
45
|
-
where: { id },
|
46
|
-
data,
|
47
|
-
});
|
48
|
-
}
|
49
|
-
async delete({ ids }) {
|
50
|
-
if (ids == undefined || ids == null) {
|
51
|
-
throw new common_1.BadRequestException(`You must select at least one setting to delete.`);
|
52
|
-
}
|
53
|
-
return this.prismaService.settings.deleteMany({
|
54
|
-
where: {
|
55
|
-
id: {
|
56
|
-
in: ids,
|
57
|
-
},
|
58
|
-
},
|
59
|
-
});
|
60
|
-
}
|
61
|
-
};
|
62
|
-
exports.SettingsService = SettingsService;
|
63
|
-
exports.SettingsService = SettingsService = __decorate([
|
64
|
-
(0, common_1.Injectable)(),
|
65
|
-
__param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => prisma_1.PrismaService))),
|
66
|
-
__param(1, (0, common_1.Inject)((0, common_1.forwardRef)(() => pagination_1.PaginationService))),
|
67
|
-
__metadata("design:paramtypes", [prisma_1.PrismaService,
|
68
|
-
pagination_1.PaginationService])
|
69
|
-
], SettingsService);
|
70
|
-
//# sourceMappingURL=settings.service.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"settings.service.js","sourceRoot":"","sources":["../../../src/setting/src/settings.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAsE;AACtE,2CAA+C;AAC/C,2CAKwB;AAMjB,IAAM,eAAe,GAArB,MAAM,eAAe;IAC1B,YAEmB,aAA4B,EAE5B,iBAAoC;QAFpC,kBAAa,GAAb,aAAa,CAAe;QAE5B,sBAAiB,GAAjB,iBAAiB,CAAmB;IACpD,CAAC;IAEJ,KAAK,CAAC,WAAW,CAAC,gBAA+B;QAC/C,MAAM,MAAM,GAAG,CAAC,MAAM,CAAC,CAAC;QAExB,MAAM,EAAE,GAAU,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAC1D,MAAM,EACN,gBAAgB,CACjB,CAAC;QAEF,OAAO,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CACpC,IAAI,CAAC,aAAa,CAAC,QAAQ,EAC3B,gBAAgB,EAChB;YACE,KAAK,EAAE;gBACL,EAAE;aACH;SACF,CACF,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,SAAiB;QACzB,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,UAAU,CAAC;YAC5C,KAAK,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE;SACzB,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAE,IAAI,EAAa;QAC9B,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,MAAM,CAAC;YACxC,IAAI,EAAE,EAAE,IAAI,EAAE;SACf,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,EAAmC;QACxD,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,MAAM,CAAC;YACxC,KAAK,EAAE,EAAE,EAAE,EAAE;YACb,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,EAAa;QAC7B,IAAI,GAAG,IAAI,SAAS,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;YACpC,MAAM,IAAI,4BAAmB,CAC3B,iDAAiD,CAClD,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,UAAU,CAAC;YAC5C,KAAK,EAAE;gBACL,EAAE,EAAE;oBACF,EAAE,EAAE,GAAG;iBACR;aACF;SACF,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AA7DY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,sBAAa,CAAC,CAAC,CAAA;IAEvC,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,8BAAiB,CAAC,CAAC,CAAA;qCADZ,sBAAa;QAET,8BAAiB;GAL5C,eAAe,CA6D3B"}
|
@@ -1,107 +0,0 @@
|
|
1
|
-
import {
|
2
|
-
MigrationInterface,
|
3
|
-
QueryRunner,
|
4
|
-
Table,
|
5
|
-
TableForeignKey,
|
6
|
-
} from "typeorm";
|
7
|
-
import { idColumn, timestampColumn } from "@hedhog/utils";
|
8
|
-
import * as bcrypt from "bcrypt";
|
9
|
-
|
10
|
-
export class Migrate1726795702341 implements MigrationInterface {
|
11
|
-
async up(queryRunner: QueryRunner) {
|
12
|
-
await queryRunner.createTable(
|
13
|
-
new Table({
|
14
|
-
name: "multifactors",
|
15
|
-
columns: [
|
16
|
-
idColumn(),
|
17
|
-
{
|
18
|
-
name: "name",
|
19
|
-
type: "varchar",
|
20
|
-
},
|
21
|
-
timestampColumn(),
|
22
|
-
timestampColumn("updated_at"),
|
23
|
-
],
|
24
|
-
}),
|
25
|
-
);
|
26
|
-
|
27
|
-
await queryRunner.manager
|
28
|
-
.createQueryBuilder()
|
29
|
-
.insert()
|
30
|
-
.into("multifactors", ["name"])
|
31
|
-
.values([
|
32
|
-
{
|
33
|
-
name: "Email",
|
34
|
-
},
|
35
|
-
{
|
36
|
-
name: "Applicativo",
|
37
|
-
},
|
38
|
-
])
|
39
|
-
.execute();
|
40
|
-
|
41
|
-
await queryRunner.createTable(
|
42
|
-
new Table({
|
43
|
-
name: "users",
|
44
|
-
columns: [
|
45
|
-
idColumn(),
|
46
|
-
{
|
47
|
-
name: "name",
|
48
|
-
type: "varchar",
|
49
|
-
},
|
50
|
-
{
|
51
|
-
name: "email",
|
52
|
-
type: "varchar",
|
53
|
-
},
|
54
|
-
{
|
55
|
-
name: "password",
|
56
|
-
type: "varchar",
|
57
|
-
},
|
58
|
-
{
|
59
|
-
name: "multifactor_id",
|
60
|
-
type: "int",
|
61
|
-
isNullable: true,
|
62
|
-
unsigned: true,
|
63
|
-
},
|
64
|
-
{
|
65
|
-
name: "code",
|
66
|
-
type: "varchar",
|
67
|
-
isNullable: true,
|
68
|
-
},
|
69
|
-
timestampColumn(),
|
70
|
-
timestampColumn("updated_at"),
|
71
|
-
],
|
72
|
-
}),
|
73
|
-
);
|
74
|
-
|
75
|
-
await queryRunner.createForeignKeys("users", [
|
76
|
-
new TableForeignKey({
|
77
|
-
columnNames: ["multifactor_id"],
|
78
|
-
referencedColumnNames: ["id"],
|
79
|
-
referencedTableName: "multifactors",
|
80
|
-
name: "fk_users_to_multifactors_on_multifactor_id",
|
81
|
-
onDelete: "Cascade",
|
82
|
-
}),
|
83
|
-
]);
|
84
|
-
|
85
|
-
await queryRunner.manager
|
86
|
-
.createQueryBuilder()
|
87
|
-
.insert()
|
88
|
-
.into("users", ["name", "email", "password"])
|
89
|
-
.values([
|
90
|
-
{
|
91
|
-
name: "Superuser",
|
92
|
-
email: "root@hedhog.com",
|
93
|
-
password: await bcrypt.hash(`hedhog`, 12),
|
94
|
-
},
|
95
|
-
{
|
96
|
-
name: "User",
|
97
|
-
email: "user@hedhog.com",
|
98
|
-
password: await bcrypt.hash(`hedhog`, 12),
|
99
|
-
},
|
100
|
-
])
|
101
|
-
.execute();
|
102
|
-
}
|
103
|
-
async down(queryRunner: QueryRunner) {
|
104
|
-
await queryRunner.dropTable("multifactors");
|
105
|
-
await queryRunner.dropTable("users");
|
106
|
-
}
|
107
|
-
}
|
@@ -1,40 +0,0 @@
|
|
1
|
-
import { idColumn, timestampColumn } from "@hedhog/utils";
|
2
|
-
|
3
|
-
import { MigrationInterface, QueryRunner, Table } from "typeorm";
|
4
|
-
|
5
|
-
export class Migrate1726795734665 implements MigrationInterface {
|
6
|
-
async up(queryRunner: QueryRunner) {
|
7
|
-
await queryRunner.createTable(
|
8
|
-
new Table({
|
9
|
-
name: "screens",
|
10
|
-
columns: [
|
11
|
-
idColumn(),
|
12
|
-
{
|
13
|
-
name: "name",
|
14
|
-
type: "varchar",
|
15
|
-
},
|
16
|
-
{
|
17
|
-
name: "slug",
|
18
|
-
type: "varchar",
|
19
|
-
isUnique: true,
|
20
|
-
},
|
21
|
-
{
|
22
|
-
name: "description",
|
23
|
-
type: "varchar",
|
24
|
-
},
|
25
|
-
{
|
26
|
-
name: "icon",
|
27
|
-
type: "varchar",
|
28
|
-
isNullable: true,
|
29
|
-
},
|
30
|
-
timestampColumn(),
|
31
|
-
timestampColumn("updated_at"),
|
32
|
-
],
|
33
|
-
}),
|
34
|
-
);
|
35
|
-
}
|
36
|
-
|
37
|
-
async down(queryRunner: QueryRunner) {
|
38
|
-
await queryRunner.dropTable("screens");
|
39
|
-
}
|
40
|
-
}
|