@asumano/worklip-typeorm-db 1.1.45 → 1.1.47

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,14 +7,16 @@ 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;
15
15
  status: number;
16
16
  due_date: Date;
17
17
  paid_date: Date | null;
18
+ retry_count: number;
19
+ next_retry_at: Date | null;
18
20
  details: Record<string, any> | null;
19
21
  created: Date;
20
22
  updated: Date | null;
@@ -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)({
@@ -125,6 +129,23 @@ __decorate([
125
129
  }),
126
130
  __metadata("design:type", Object)
127
131
  ], BillingInvoice.prototype, "paid_date", void 0);
132
+ __decorate([
133
+ (0, typeorm_1.Column)({
134
+ type: "int",
135
+ default: 0,
136
+ comment: "Reintentos de cobro automático (dunning) ya realizados sobre la factura.",
137
+ }),
138
+ __metadata("design:type", Number)
139
+ ], BillingInvoice.prototype, "retry_count", void 0);
140
+ __decorate([
141
+ (0, typeorm_1.Column)({
142
+ type: "datetime",
143
+ nullable: true,
144
+ default: null,
145
+ comment: "Próxima fecha de reintento de cobro automático (dunning). NULL = sin reintento programado.",
146
+ }),
147
+ __metadata("design:type", Object)
148
+ ], BillingInvoice.prototype, "next_retry_at", void 0);
128
149
  __decorate([
129
150
  (0, typeorm_1.Column)({
130
151
  type: "json",
@@ -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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asumano/worklip-typeorm-db",
3
- "version": "1.1.45",
3
+ "version": "1.1.47",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },