@fabx.vn/core 1.0.6 → 1.0.7

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.
@@ -0,0 +1,11 @@
1
+ export declare abstract class BaseEntity {
2
+ id: number;
3
+ searchKeyword: string;
4
+ createdOrg: number;
5
+ createdBy: number;
6
+ updatedBy: number;
7
+ deletedBy: number;
8
+ createdAt: Date;
9
+ updatedAt: Date;
10
+ deletedAt: Date;
11
+ }
@@ -0,0 +1,53 @@
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.BaseEntity = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ class BaseEntity {
15
+ }
16
+ exports.BaseEntity = BaseEntity;
17
+ __decorate([
18
+ (0, typeorm_1.PrimaryGeneratedColumn)({ type: "bigint" }),
19
+ __metadata("design:type", Number)
20
+ ], BaseEntity.prototype, "id", void 0);
21
+ __decorate([
22
+ (0, typeorm_1.Column)({ name: "search_keyword", type: "text", nullable: true }),
23
+ __metadata("design:type", String)
24
+ ], BaseEntity.prototype, "searchKeyword", void 0);
25
+ __decorate([
26
+ (0, typeorm_1.Column)({ name: "created_org", type: "bigint", nullable: true }),
27
+ __metadata("design:type", Number)
28
+ ], BaseEntity.prototype, "createdOrg", void 0);
29
+ __decorate([
30
+ (0, typeorm_1.Column)({ name: "created_by", type: "bigint", nullable: true }),
31
+ __metadata("design:type", Number)
32
+ ], BaseEntity.prototype, "createdBy", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)({ name: "updated_by", type: "bigint", nullable: true }),
35
+ __metadata("design:type", Number)
36
+ ], BaseEntity.prototype, "updatedBy", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.Column)({ name: "deleted_by", type: "bigint", nullable: true }),
39
+ __metadata("design:type", Number)
40
+ ], BaseEntity.prototype, "deletedBy", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.CreateDateColumn)({ name: "created_at" }),
43
+ __metadata("design:type", Date)
44
+ ], BaseEntity.prototype, "createdAt", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.UpdateDateColumn)({ name: "updated_at", nullable: true }),
47
+ __metadata("design:type", Date)
48
+ ], BaseEntity.prototype, "updatedAt", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.DeleteDateColumn)({ name: "deleted_at", nullable: true }),
51
+ __metadata("design:type", Date)
52
+ ], BaseEntity.prototype, "deletedAt", void 0);
53
+ //# sourceMappingURL=base.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.entity.js","sourceRoot":"","sources":["../../../src/core/entities/base.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAMiB;AAEjB,MAAsB,UAAU;CA2B/B;AA3BD,gCA2BC;AAzBC;IADC,IAAA,gCAAsB,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;;sCAChC;AAGX;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDAC3C;AAGtB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CAC7C;AAGnB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CAC7C;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CAC7C;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CAC7C;AAGlB;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;8BAC9B,IAAI;6CAAC;AAGhB;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BAC9C,IAAI;6CAAC;AAGhB;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BAC9C,IAAI;6CAAC"}
package/dist/index.d.ts CHANGED
@@ -19,6 +19,7 @@ export { HttpExceptionFilter } from "./core/filters/http-exception.filter";
19
19
  export { RequestContextInterceptor } from "./core/interceptors/request-context.interceptor";
20
20
  export { JwtStrategy } from "./core/strategies/jwt.strategy";
21
21
  export { AuditSubscriber } from "./core/subscribers/audit.subscriber";
22
+ export { BaseEntity } from "./core/entities/base.entity";
22
23
  export { jwtConfig } from "./config/jwt.config";
23
24
  export { redisConfig } from "./config/redis.config";
24
25
  export { databaseConfig } from "./config/database.config";
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createServiceClient = exports.apiClient = exports.AxiosClient = exports.DateUtils = exports.SUCCESS_RESPONSES = exports.SUCCESS_MESSAGES = exports.ERROR_RESPONSES = exports.ERROR_MESSAGES = exports.MESSAGES = exports.googleOAuthConfig = exports.corsConfig = exports.internalConfig = exports.cookieConfig = exports.RABBITMQ_ROUTING_KEYS = exports.rabbitmqConfig = exports.databaseConfig = exports.redisConfig = exports.jwtConfig = exports.AuditSubscriber = exports.JwtStrategy = exports.RequestContextInterceptor = exports.HttpExceptionFilter = exports.PaginationMetaDto = exports.PaginationResponseDto = exports.PaginationDto = exports.ApiResponseDto = exports.ANY_PERMISSIONS_KEY = exports.PERMISSIONS_KEY = exports.RequireAnyPermission = exports.RequirePermissions = exports.IS_PUBLIC_KEY = exports.Public = exports.CurrentUser = exports.PermissionGuard = exports.InternalAuthGuard = exports.JwtAuthGuard = exports.BasePaginationService = exports.RequestInfoService = exports.RequestContextService = exports.RabbitMQPublisher = exports.CookieService = exports.RedisService = exports.SessionService = exports.CoreJwtService = exports.CoreModule = void 0;
3
+ exports.createServiceClient = exports.apiClient = exports.AxiosClient = exports.DateUtils = exports.SUCCESS_RESPONSES = exports.SUCCESS_MESSAGES = exports.ERROR_RESPONSES = exports.ERROR_MESSAGES = exports.MESSAGES = exports.googleOAuthConfig = exports.corsConfig = exports.internalConfig = exports.cookieConfig = exports.RABBITMQ_ROUTING_KEYS = exports.rabbitmqConfig = exports.databaseConfig = exports.redisConfig = exports.jwtConfig = exports.BaseEntity = exports.AuditSubscriber = exports.JwtStrategy = exports.RequestContextInterceptor = exports.HttpExceptionFilter = exports.PaginationMetaDto = exports.PaginationResponseDto = exports.PaginationDto = exports.ApiResponseDto = exports.ANY_PERMISSIONS_KEY = exports.PERMISSIONS_KEY = exports.RequireAnyPermission = exports.RequirePermissions = exports.IS_PUBLIC_KEY = exports.Public = exports.CurrentUser = exports.PermissionGuard = exports.InternalAuthGuard = exports.JwtAuthGuard = exports.BasePaginationService = exports.RequestInfoService = exports.RequestContextService = exports.RabbitMQPublisher = exports.CookieService = exports.RedisService = exports.SessionService = exports.CoreJwtService = exports.CoreModule = void 0;
4
4
  var core_module_1 = require("./core/core.module");
5
5
  Object.defineProperty(exports, "CoreModule", { enumerable: true, get: function () { return core_module_1.CoreModule; } });
6
6
  var jwt_service_1 = require("./core/services/jwt.service");
@@ -49,6 +49,8 @@ var jwt_strategy_1 = require("./core/strategies/jwt.strategy");
49
49
  Object.defineProperty(exports, "JwtStrategy", { enumerable: true, get: function () { return jwt_strategy_1.JwtStrategy; } });
50
50
  var audit_subscriber_1 = require("./core/subscribers/audit.subscriber");
51
51
  Object.defineProperty(exports, "AuditSubscriber", { enumerable: true, get: function () { return audit_subscriber_1.AuditSubscriber; } });
52
+ var base_entity_1 = require("./core/entities/base.entity");
53
+ Object.defineProperty(exports, "BaseEntity", { enumerable: true, get: function () { return base_entity_1.BaseEntity; } });
52
54
  var jwt_config_1 = require("./config/jwt.config");
53
55
  Object.defineProperty(exports, "jwtConfig", { enumerable: true, get: function () { return jwt_config_1.jwtConfig; } });
54
56
  var redis_config_1 = require("./config/redis.config");
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAYA,iDAA+C;AAAtC,yGAAA,UAAU,OAAA;AAGnB,0DAA4D;AAAnD,6GAAA,cAAc,OAAA;AACvB,kEAAgF;AAAvE,iHAAA,cAAc,OAAA;AACvB,8DAA4D;AAAnD,6GAAA,YAAY,OAAA;AACrB,gEAGuC;AAFrC,+GAAA,aAAa,OAAA;AAGf,wFAA8E;AAArE,+HAAA,iBAAiB,OAAA;AAC1B,kFAGgD;AAF9C,gIAAA,qBAAqB,OAAA;AAGvB,4EAAyE;AAAhE,0HAAA,kBAAkB,OAAA;AAC3B,kFAA+E;AAAtE,gIAAA,qBAAqB,OAAA;AAG9B,8DAA2D;AAAlD,8GAAA,YAAY,OAAA;AACrB,wEAAqE;AAA5D,wHAAA,iBAAiB,OAAA;AAC1B,kEAAgE;AAAvD,mHAAA,eAAe,OAAA;AAGxB,kFAAsE;AAA7D,qHAAA,WAAW,OAAA;AACpB,sEAA0E;A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