@asumano/worklip-typeorm-db 1.1.46 → 1.1.48

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.
@@ -7,8 +7,8 @@ export declare class BillingInvoice {
7
7
  company_subscription: CompanySubscription;
8
8
  payment_reference: string | null;
9
9
  invoice_number: string;
10
- period_year: number;
11
- period_month: number;
10
+ period_year: number | null;
11
+ period_month: number | null;
12
12
  subtotal: number;
13
13
  tax: number;
14
14
  total: number;
@@ -61,16 +61,20 @@ __decorate([
61
61
  __decorate([
62
62
  (0, typeorm_1.Column)({
63
63
  type: "int",
64
- comment: "Año facturado.",
64
+ nullable: true,
65
+ default: null,
66
+ comment: "Año facturado. NULL en facturas de ajuste/prorrateo (no ligadas a un mes).",
65
67
  }),
66
- __metadata("design:type", Number)
68
+ __metadata("design:type", Object)
67
69
  ], BillingInvoice.prototype, "period_year", void 0);
68
70
  __decorate([
69
71
  (0, typeorm_1.Column)({
70
72
  type: "int",
71
- comment: "Mes facturado.",
73
+ nullable: true,
74
+ default: null,
75
+ comment: "Mes facturado. NULL en facturas de ajuste/prorrateo (no ligadas a un mes).",
72
76
  }),
73
- __metadata("design:type", Number)
77
+ __metadata("design:type", Object)
74
78
  ], BillingInvoice.prototype, "period_month", void 0);
75
79
  __decorate([
76
80
  (0, typeorm_1.Column)({
@@ -6,6 +6,8 @@ export declare class CompanySubscription {
6
6
  id: number;
7
7
  company: Company;
8
8
  subscription_plan: SubscriptionPlan;
9
+ pending_plan: SubscriptionPlan | null;
10
+ pending_plan_price: number | null;
9
11
  start_date: string;
10
12
  end_date: string | null;
11
13
  billing_day: number;
@@ -41,6 +41,26 @@ __decorate([
41
41
  (0, typeorm_1.JoinColumn)({ name: "subscription_plan" }),
42
42
  __metadata("design:type", SubscriptionPlan_1.SubscriptionPlan)
43
43
  ], CompanySubscription.prototype, "subscription_plan", void 0);
44
+ __decorate([
45
+ (0, typeorm_1.ManyToOne)(() => SubscriptionPlan_1.SubscriptionPlan, {
46
+ onDelete: "SET NULL",
47
+ onUpdate: "NO ACTION",
48
+ nullable: true,
49
+ }),
50
+ (0, typeorm_1.JoinColumn)({ name: "pending_plan" }),
51
+ __metadata("design:type", Object)
52
+ ], CompanySubscription.prototype, "pending_plan", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)({
55
+ type: "decimal",
56
+ precision: 14,
57
+ scale: 2,
58
+ nullable: true,
59
+ default: null,
60
+ comment: "Precio congelado del plan agendado (downgrade). NULL si no hay.",
61
+ }),
62
+ __metadata("design:type", Object)
63
+ ], CompanySubscription.prototype, "pending_plan_price", void 0);
44
64
  __decorate([
45
65
  (0, typeorm_1.Column)({
46
66
  type: "date",
@@ -79,7 +99,7 @@ __decorate([
79
99
  default: 1,
80
100
  type: "int",
81
101
  width: 1,
82
- comment: "Estado del plan de la empresa:\r\n1: Activo.\r\n2: Suspendido.\r\n3: Cancelado.\r\n4: Expirado.\r\n5: Trial ().",
102
+ comment: "Estado del plan de la empresa:\r\n1: Activo.\r\n2: Suspendido.\r\n3: Cancelado.\r\n4: Expirado.\r\n5: Trial ().\r\n6: Pendiente de pago (elegido pero aún sin pagar la primera factura).",
83
103
  }),
84
104
  __metadata("design:type", Number)
85
105
  ], CompanySubscription.prototype, "status", void 0);
@@ -8,6 +8,8 @@ export declare class UsageAlert {
8
8
  action_type: number;
9
9
  subscription_addon_template: SubscriptionAddonTemplate;
10
10
  notification_email: string | null;
11
+ last_triggered_at: Date | null;
12
+ max_autopurchases: number | null;
11
13
  status: number;
12
14
  created: Date;
13
15
  updated: Date | null;
@@ -70,6 +70,24 @@ __decorate([
70
70
  }),
71
71
  __metadata("design:type", Object)
72
72
  ], UsageAlert.prototype, "notification_email", void 0);
73
+ __decorate([
74
+ (0, typeorm_1.Column)({
75
+ type: "datetime",
76
+ nullable: true,
77
+ default: null,
78
+ comment: "Última vez que se disparó la alerta (anti-repetición). Se fija al cruzar el umbral y se limpia (NULL = armada) cuando el uso baja del umbral.",
79
+ }),
80
+ __metadata("design:type", Object)
81
+ ], UsageAlert.prototype, "last_triggered_at", void 0);
82
+ __decorate([
83
+ (0, typeorm_1.Column)({
84
+ type: "int",
85
+ nullable: true,
86
+ default: null,
87
+ comment: "Tope de compras automáticas por ciclo de facturación para esta alerta. NULL = sin límite.",
88
+ }),
89
+ __metadata("design:type", Object)
90
+ ], UsageAlert.prototype, "max_autopurchases", void 0);
73
91
  __decorate([
74
92
  (0, typeorm_1.Column)({
75
93
  default: 1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asumano/worklip-typeorm-db",
3
- "version": "1.1.46",
3
+ "version": "1.1.48",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },