@natrave/shared-entities 1.2.20 → 1.2.21

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.
@@ -1,8 +1,9 @@
1
1
  import { Coupon } from '../coupons/coupon.entity';
2
+ import { CouponTargetType } from './enums/target-type.enum';
2
3
  export declare class CouponUsage {
3
4
  id: number;
4
5
  couponId: number;
5
- targetType: string;
6
+ targetType: CouponTargetType;
6
7
  targetId: number;
7
8
  createdAt: Date;
8
9
  coupon: Coupon;
@@ -1 +1 @@
1
- {"version":3,"file":"coupon-usage.entity.d.ts","sourceRoot":"","sources":["../../../src/coupons/coupon-usages/coupon-usage.entity.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAWlD,qBACa,WAAW;IAEtB,EAAE,EAAE,MAAM,CAAC;IAGX,QAAQ,EAAE,MAAM,CAAC;IAQjB,UAAU,EAAE,MAAM,CAAC;IAOnB,QAAQ,EAAE,MAAM,CAAC;IAOjB,SAAS,EAAE,IAAI,CAAC;IAQhB,MAAM,EAAE,MAAM,CAAC;CAChB"}
1
+ {"version":3,"file":"coupon-usage.entity.d.ts","sourceRoot":"","sources":["../../../src/coupons/coupon-usages/coupon-usage.entity.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAW5D,qBACa,WAAW;IAEtB,EAAE,EAAE,MAAM,CAAC;IAGX,QAAQ,EAAE,MAAM,CAAC;IAQjB,UAAU,EAAE,gBAAgB,CAAC;IAO7B,QAAQ,EAAE,MAAM,CAAC;IAOjB,SAAS,EAAE,IAAI,CAAC;IAQhB,MAAM,EAAE,MAAM,CAAC;CAChB"}
@@ -17,6 +17,7 @@ import {
17
17
  PrimaryGeneratedColumn
18
18
  } from "typeorm";
19
19
  import { Coupon } from "../coupons/coupon.entity.js";
20
+ import { CouponTargetType } from "./enums/target-type.enum.js";
20
21
  let CouponUsage = class {
21
22
  };
22
23
  __decorateClass([
@@ -28,8 +29,8 @@ __decorateClass([
28
29
  __decorateClass([
29
30
  Column({
30
31
  name: "target_type",
31
- type: "varchar",
32
- length: 50,
32
+ type: "enum",
33
+ enum: CouponTargetType,
33
34
  comment: "Tipo do objeto que utilizou o cupom (ex: tournament, subscription, etc)."
34
35
  })
35
36
  ], CouponUsage.prototype, "targetType", 2);
@@ -0,0 +1,4 @@
1
+ export declare enum CouponTargetType {
2
+ TOURNAMENT = "tournament"
3
+ }
4
+ //# sourceMappingURL=target-type.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"target-type.enum.d.ts","sourceRoot":"","sources":["../../../../src/coupons/coupon-usages/enums/target-type.enum.ts"],"names":[],"mappings":"AASA,oBAAY,gBAAgB;IAI1B,UAAU,eAAe;CAC1B"}
@@ -0,0 +1,7 @@
1
+ var CouponTargetType = /* @__PURE__ */ ((CouponTargetType2) => {
2
+ CouponTargetType2["TOURNAMENT"] = "tournament";
3
+ return CouponTargetType2;
4
+ })(CouponTargetType || {});
5
+ export {
6
+ CouponTargetType
7
+ };
@@ -1,2 +1,3 @@
1
1
  export { CouponUsage } from './coupon-usage.entity';
2
+ export { CouponTargetType } from './enums/target-type.enum';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/coupons/coupon-usages/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/coupons/coupon-usages/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -1,4 +1,6 @@
1
1
  import { CouponUsage } from "./coupon-usage.entity.js";
2
+ import { CouponTargetType } from "./enums/target-type.enum.js";
2
3
  export {
4
+ CouponTargetType,
3
5
  CouponUsage
4
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natrave/shared-entities",
3
- "version": "1.2.20",
3
+ "version": "1.2.21",
4
4
  "description": "Entidades compartilhadass da NaTrave",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.js",