@natrave/shared-entities 7.4.0 → 7.6.0

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.
Files changed (28) hide show
  1. package/dist/billing/billing-invoice-line-items/billing-invoice-line-item.entity.d.ts +15 -0
  2. package/dist/billing/billing-invoice-line-items/billing-invoice-line-item.entity.d.ts.map +1 -0
  3. package/dist/billing/billing-invoice-line-items/billing-invoice-line-item.entity.js +99 -0
  4. package/dist/billing/billing-invoice-line-items/index.d.ts +2 -0
  5. package/dist/billing/billing-invoice-line-items/index.d.ts.map +1 -0
  6. package/dist/billing/billing-invoice-line-items/index.js +1 -0
  7. package/dist/billing/billing-invoices/billing-invoice.entity.d.ts +38 -0
  8. package/dist/billing/billing-invoices/billing-invoice.entity.d.ts.map +1 -0
  9. package/dist/billing/billing-invoices/billing-invoice.entity.js +285 -0
  10. package/dist/billing/billing-invoices/enums/billing-invoice-status.enum.d.ts +7 -0
  11. package/dist/billing/billing-invoices/enums/billing-invoice-status.enum.d.ts.map +1 -0
  12. package/dist/billing/billing-invoices/enums/billing-invoice-status.enum.js +10 -0
  13. package/dist/billing/billing-invoices/index.d.ts +3 -0
  14. package/dist/billing/billing-invoices/index.d.ts.map +1 -0
  15. package/dist/billing/billing-invoices/index.js +2 -0
  16. package/dist/billing/index.d.ts +2 -0
  17. package/dist/billing/index.d.ts.map +1 -1
  18. package/dist/billing/index.js +2 -0
  19. package/dist/tournaments/tournament-matches/enums/match-scoresheet-source.enum.d.ts +5 -0
  20. package/dist/tournaments/tournament-matches/enums/match-scoresheet-source.enum.d.ts.map +1 -0
  21. package/dist/tournaments/tournament-matches/enums/match-scoresheet-source.enum.js +8 -0
  22. package/dist/tournaments/tournament-matches/index.d.ts +1 -0
  23. package/dist/tournaments/tournament-matches/index.d.ts.map +1 -1
  24. package/dist/tournaments/tournament-matches/index.js +2 -0
  25. package/dist/tournaments/tournament-matches/tournament-match.entity.d.ts +2 -0
  26. package/dist/tournaments/tournament-matches/tournament-match.entity.d.ts.map +1 -1
  27. package/dist/tournaments/tournament-matches/tournament-match.entity.js +11 -0
  28. package/package.json +1 -1
@@ -0,0 +1,15 @@
1
+ import { BillingInvoice } from '../billing-invoices';
2
+ import { BillingPlan } from '../billing-plans';
3
+ export declare class BillingInvoiceLineItem {
4
+ id: string;
5
+ invoiceId: string;
6
+ planId: string | null;
7
+ description: string;
8
+ quantity: number;
9
+ unitAmount: number;
10
+ amount: number;
11
+ createdAt: Date;
12
+ invoice: BillingInvoice;
13
+ plan: BillingPlan | null;
14
+ }
15
+ //# sourceMappingURL=billing-invoice-line-item.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"billing-invoice-line-item.entity.d.ts","sourceRoot":"","sources":["../../../src/billing/billing-invoice-line-items/billing-invoice-line-item.entity.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAa/C,qBAIa,sBAAsB;IAIjC,EAAE,EAAE,MAAM,CAAC;IAOX,SAAS,EAAE,MAAM,CAAC;IAQlB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAQtB,WAAW,EAAE,MAAM,CAAC;IAOpB,QAAQ,EAAE,MAAM,CAAC;IAOjB,UAAU,EAAE,MAAM,CAAC;IAOnB,MAAM,EAAE,MAAM,CAAC;IAOf,SAAS,EAAE,IAAI,CAAC;IAYhB,OAAO,EAAE,cAAc,CAAC;IAQxB,IAAI,EAAE,WAAW,GAAG,IAAI,CAAC;CAC1B"}
@@ -0,0 +1,99 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __decorateClass = (decorators, target, key, kind) => {
4
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
5
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
6
+ if (decorator = decorators[i])
7
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8
+ if (kind && result) __defProp(target, key, result);
9
+ return result;
10
+ };
11
+ import {
12
+ Check,
13
+ Column,
14
+ CreateDateColumn,
15
+ Entity,
16
+ Index,
17
+ JoinColumn,
18
+ ManyToOne,
19
+ PrimaryGeneratedColumn
20
+ } from "typeorm";
21
+ import { BillingInvoice } from "../billing-invoices/index.js";
22
+ import { BillingPlan } from "../billing-plans/index.js";
23
+ let BillingInvoiceLineItem = class {
24
+ };
25
+ __decorateClass([
26
+ PrimaryGeneratedColumn("uuid", {
27
+ comment: "Identificador \xFAnico da linha."
28
+ })
29
+ ], BillingInvoiceLineItem.prototype, "id", 2);
30
+ __decorateClass([
31
+ Column({
32
+ name: "invoice_id",
33
+ type: "uuid",
34
+ comment: "Identificador da fatura \xE0 qual a linha pertence."
35
+ })
36
+ ], BillingInvoiceLineItem.prototype, "invoiceId", 2);
37
+ __decorateClass([
38
+ Column({
39
+ name: "plan_id",
40
+ type: "uuid",
41
+ nullable: true,
42
+ comment: "Vers\xE3o de plano cobrada. Nulo em linha de desconto/cupom."
43
+ })
44
+ ], BillingInvoiceLineItem.prototype, "planId", 2);
45
+ __decorateClass([
46
+ Column({
47
+ name: "description",
48
+ type: "varchar",
49
+ length: 255,
50
+ comment: 'Descri\xE7\xE3o da linha (ex.: "Licen\xE7a de campeonato", "Cupom LANC10").'
51
+ })
52
+ ], BillingInvoiceLineItem.prototype, "description", 2);
53
+ __decorateClass([
54
+ Column({
55
+ type: "int",
56
+ default: 1,
57
+ comment: "Quantidade cobrada nesta linha."
58
+ })
59
+ ], BillingInvoiceLineItem.prototype, "quantity", 2);
60
+ __decorateClass([
61
+ Column({
62
+ name: "unit_amount",
63
+ type: "int",
64
+ comment: "Pre\xE7o unit\xE1rio congelado, em centavos. Negativo em desconto."
65
+ })
66
+ ], BillingInvoiceLineItem.prototype, "unitAmount", 2);
67
+ __decorateClass([
68
+ Column({
69
+ name: "amount",
70
+ type: "int",
71
+ comment: "Total da linha (unitAmount \xD7 quantity), em centavos. Negativo em desconto."
72
+ })
73
+ ], BillingInvoiceLineItem.prototype, "amount", 2);
74
+ __decorateClass([
75
+ CreateDateColumn({
76
+ name: "created_at",
77
+ type: "timestamptz",
78
+ comment: "Data de cria\xE7\xE3o do registro."
79
+ })
80
+ ], BillingInvoiceLineItem.prototype, "createdAt", 2);
81
+ __decorateClass([
82
+ ManyToOne(() => BillingInvoice, (invoice) => invoice.lineItems, {
83
+ onDelete: "RESTRICT"
84
+ }),
85
+ JoinColumn({ name: "invoice_id" })
86
+ ], BillingInvoiceLineItem.prototype, "invoice", 2);
87
+ __decorateClass([
88
+ ManyToOne(() => BillingPlan, { onDelete: "RESTRICT", nullable: true }),
89
+ JoinColumn({ name: "plan_id" })
90
+ ], BillingInvoiceLineItem.prototype, "plan", 2);
91
+ BillingInvoiceLineItem = __decorateClass([
92
+ Entity("billing_invoice_line_items"),
93
+ Check("CHK_billing_invoice_line_items_quantity_positive", '"quantity" >= 1'),
94
+ Index("idx_billing_invoice_line_items_invoice", ["invoiceId"]),
95
+ Index("idx_billing_invoice_line_items_plan", ["planId"])
96
+ ], BillingInvoiceLineItem);
97
+ export {
98
+ BillingInvoiceLineItem
99
+ };
@@ -0,0 +1,2 @@
1
+ export * from './billing-invoice-line-item.entity';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/billing/billing-invoice-line-items/index.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC"}
@@ -0,0 +1 @@
1
+ export * from "./billing-invoice-line-item.entity.js";
@@ -0,0 +1,38 @@
1
+ import { BillingAccount } from '../billing-accounts';
2
+ import { BillingInvoiceLineItem } from '../billing-invoice-line-items';
3
+ import { BillingSubscription } from '../billing-subscriptions';
4
+ import { BillingInvoiceStatus } from './enums/billing-invoice-status.enum';
5
+ export declare class BillingInvoice {
6
+ id: string;
7
+ invoiceNumber: string;
8
+ billingAccountId: string;
9
+ subscriptionId: string | null;
10
+ status: BillingInvoiceStatus;
11
+ subtotalAmount: number;
12
+ discountAmount: number;
13
+ totalAmount: number;
14
+ amountPaid: number;
15
+ billingPersonType: string | null;
16
+ billingDocument: string | null;
17
+ billingLegalName: string | null;
18
+ billingEmail: string | null;
19
+ billingPhone: string | null;
20
+ billingAddressPostalCode: string | null;
21
+ billingAddressStreet: string | null;
22
+ billingAddressNumber: string | null;
23
+ billingAddressComplement: string | null;
24
+ billingAddressNeighborhood: string | null;
25
+ billingAddressCity: string | null;
26
+ billingAddressState: string | null;
27
+ billingAddressCountry: string | null;
28
+ issuedAt: Date | null;
29
+ dueAt: Date | null;
30
+ paidAt: Date | null;
31
+ voidedAt: Date | null;
32
+ createdAt: Date;
33
+ updatedAt: Date;
34
+ billingAccount: BillingAccount;
35
+ subscription: BillingSubscription | null;
36
+ lineItems: BillingInvoiceLineItem[];
37
+ }
38
+ //# sourceMappingURL=billing-invoice.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"billing-invoice.entity.d.ts","sourceRoot":"","sources":["../../../src/billing/billing-invoices/billing-invoice.entity.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAmB3E,qBASa,cAAc;IAIzB,EAAE,EAAE,MAAM,CAAC;IAQX,aAAa,EAAE,MAAM,CAAC;IAOtB,gBAAgB,EAAE,MAAM,CAAC;IAQzB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAS9B,MAAM,EAAE,oBAAoB,CAAC;IAS7B,cAAc,EAAE,MAAM,CAAC;IAQvB,cAAc,EAAE,MAAM,CAAC;IAOvB,WAAW,EAAE,MAAM,CAAC;IAQpB,UAAU,EAAE,MAAM,CAAC;IAWnB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IASjC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAS/B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAShC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAS5B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAS5B,wBAAwB,EAAE,MAAM,GAAG,IAAI,CAAC;IASxC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IASpC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IASpC,wBAAwB,EAAE,MAAM,GAAG,IAAI,CAAC;IASxC,0BAA0B,EAAE,MAAM,GAAG,IAAI,CAAC;IAS1C,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IASlC,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IASnC,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;IAUrC,QAAQ,EAAE,IAAI,GAAG,IAAI,CAAC;IAQtB,KAAK,EAAE,IAAI,GAAG,IAAI,CAAC;IAQnB,MAAM,EAAE,IAAI,GAAG,IAAI,CAAC;IAQpB,QAAQ,EAAE,IAAI,GAAG,IAAI,CAAC;IAOtB,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAShB,cAAc,EAAE,cAAc,CAAC;IAO/B,YAAY,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAMzC,SAAS,EAAE,sBAAsB,EAAE,CAAC;CACrC"}
@@ -0,0 +1,285 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __decorateClass = (decorators, target, key, kind) => {
4
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
5
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
6
+ if (decorator = decorators[i])
7
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8
+ if (kind && result) __defProp(target, key, result);
9
+ return result;
10
+ };
11
+ import {
12
+ Check,
13
+ Column,
14
+ CreateDateColumn,
15
+ Entity,
16
+ Generated,
17
+ Index,
18
+ JoinColumn,
19
+ ManyToOne,
20
+ OneToMany,
21
+ PrimaryGeneratedColumn,
22
+ Unique,
23
+ UpdateDateColumn
24
+ } from "typeorm";
25
+ import { BillingAccount } from "../billing-accounts/index.js";
26
+ import { BillingInvoiceLineItem } from "../billing-invoice-line-items/index.js";
27
+ import { BillingSubscription } from "../billing-subscriptions/index.js";
28
+ import { BillingInvoiceStatus } from "./enums/billing-invoice-status.enum.js";
29
+ let BillingInvoice = class {
30
+ };
31
+ __decorateClass([
32
+ PrimaryGeneratedColumn("uuid", {
33
+ comment: "Identificador \xFAnico (opaco) da fatura."
34
+ })
35
+ ], BillingInvoice.prototype, "id", 2);
36
+ __decorateClass([
37
+ Column({
38
+ name: "invoice_number",
39
+ type: "bigint",
40
+ comment: "N\xFAmero sequencial leg\xEDvel da fatura (refer\xEAncia interna, n\xE3o \xE9 NF-e)."
41
+ }),
42
+ Generated("increment")
43
+ ], BillingInvoice.prototype, "invoiceNumber", 2);
44
+ __decorateClass([
45
+ Column({
46
+ name: "billing_account_id",
47
+ type: "uuid",
48
+ comment: "Identificador da conta de billing respons\xE1vel pela fatura."
49
+ })
50
+ ], BillingInvoice.prototype, "billingAccountId", 2);
51
+ __decorateClass([
52
+ Column({
53
+ name: "subscription_id",
54
+ type: "uuid",
55
+ nullable: true,
56
+ comment: "Assinatura de origem. Nulo em fatura avulsa."
57
+ })
58
+ ], BillingInvoice.prototype, "subscriptionId", 2);
59
+ __decorateClass([
60
+ Column({
61
+ type: "enum",
62
+ enum: BillingInvoiceStatus,
63
+ enumName: "billing_invoices_status_enum",
64
+ default: BillingInvoiceStatus.DRAFT,
65
+ comment: "Estado da fatura (DRAFT \u2192 OPEN \u2192 PAID | VOID)."
66
+ })
67
+ ], BillingInvoice.prototype, "status", 2);
68
+ __decorateClass([
69
+ Column({
70
+ name: "subtotal_amount",
71
+ type: "int",
72
+ comment: "Soma das linhas positivas, em centavos."
73
+ })
74
+ ], BillingInvoice.prototype, "subtotalAmount", 2);
75
+ __decorateClass([
76
+ Column({
77
+ name: "discount_amount",
78
+ type: "int",
79
+ default: 0,
80
+ comment: "Total de descontos (agregado das linhas negativas), em centavos."
81
+ })
82
+ ], BillingInvoice.prototype, "discountAmount", 2);
83
+ __decorateClass([
84
+ Column({
85
+ name: "total_amount",
86
+ type: "int",
87
+ comment: "Valor devido = subtotal \u2212 desconto, em centavos."
88
+ })
89
+ ], BillingInvoice.prototype, "totalAmount", 2);
90
+ __decorateClass([
91
+ Column({
92
+ name: "amount_paid",
93
+ type: "int",
94
+ default: 0,
95
+ comment: "Total j\xE1 alocado a esta fatura (camada de pagamento), em centavos."
96
+ })
97
+ ], BillingInvoice.prototype, "amountPaid", 2);
98
+ __decorateClass([
99
+ Column({
100
+ name: "billing_person_type",
101
+ type: "varchar",
102
+ length: 20,
103
+ nullable: true,
104
+ comment: "Natureza jur\xEDdica congelada (individual/company)."
105
+ })
106
+ ], BillingInvoice.prototype, "billingPersonType", 2);
107
+ __decorateClass([
108
+ Column({
109
+ name: "billing_document",
110
+ type: "varchar",
111
+ length: 14,
112
+ nullable: true,
113
+ comment: "Documento fiscal congelado (CPF/CNPJ, s\xF3 d\xEDgitos)."
114
+ })
115
+ ], BillingInvoice.prototype, "billingDocument", 2);
116
+ __decorateClass([
117
+ Column({
118
+ name: "billing_legal_name",
119
+ type: "varchar",
120
+ length: 255,
121
+ nullable: true,
122
+ comment: "Nome/raz\xE3o social congelado."
123
+ })
124
+ ], BillingInvoice.prototype, "billingLegalName", 2);
125
+ __decorateClass([
126
+ Column({
127
+ name: "billing_email",
128
+ type: "varchar",
129
+ length: 255,
130
+ nullable: true,
131
+ comment: "E-mail de cobran\xE7a congelado."
132
+ })
133
+ ], BillingInvoice.prototype, "billingEmail", 2);
134
+ __decorateClass([
135
+ Column({
136
+ name: "billing_phone",
137
+ type: "varchar",
138
+ length: 20,
139
+ nullable: true,
140
+ comment: "Telefone congelado."
141
+ })
142
+ ], BillingInvoice.prototype, "billingPhone", 2);
143
+ __decorateClass([
144
+ Column({
145
+ name: "billing_address_postal_code",
146
+ type: "varchar",
147
+ length: 8,
148
+ nullable: true,
149
+ comment: "CEP congelado."
150
+ })
151
+ ], BillingInvoice.prototype, "billingAddressPostalCode", 2);
152
+ __decorateClass([
153
+ Column({
154
+ name: "billing_address_street",
155
+ type: "varchar",
156
+ length: 255,
157
+ nullable: true,
158
+ comment: "Logradouro congelado."
159
+ })
160
+ ], BillingInvoice.prototype, "billingAddressStreet", 2);
161
+ __decorateClass([
162
+ Column({
163
+ name: "billing_address_number",
164
+ type: "varchar",
165
+ length: 20,
166
+ nullable: true,
167
+ comment: "N\xFAmero congelado."
168
+ })
169
+ ], BillingInvoice.prototype, "billingAddressNumber", 2);
170
+ __decorateClass([
171
+ Column({
172
+ name: "billing_address_complement",
173
+ type: "varchar",
174
+ length: 100,
175
+ nullable: true,
176
+ comment: "Complemento congelado."
177
+ })
178
+ ], BillingInvoice.prototype, "billingAddressComplement", 2);
179
+ __decorateClass([
180
+ Column({
181
+ name: "billing_address_neighborhood",
182
+ type: "varchar",
183
+ length: 100,
184
+ nullable: true,
185
+ comment: "Bairro congelado."
186
+ })
187
+ ], BillingInvoice.prototype, "billingAddressNeighborhood", 2);
188
+ __decorateClass([
189
+ Column({
190
+ name: "billing_address_city",
191
+ type: "varchar",
192
+ length: 100,
193
+ nullable: true,
194
+ comment: "Cidade congelada."
195
+ })
196
+ ], BillingInvoice.prototype, "billingAddressCity", 2);
197
+ __decorateClass([
198
+ Column({
199
+ name: "billing_address_state",
200
+ type: "char",
201
+ length: 2,
202
+ nullable: true,
203
+ comment: "UF congelada."
204
+ })
205
+ ], BillingInvoice.prototype, "billingAddressState", 2);
206
+ __decorateClass([
207
+ Column({
208
+ name: "billing_address_country",
209
+ type: "char",
210
+ length: 2,
211
+ nullable: true,
212
+ comment: "Pa\xEDs congelado (ISO alpha-2)."
213
+ })
214
+ ], BillingInvoice.prototype, "billingAddressCountry", 2);
215
+ __decorateClass([
216
+ Column({
217
+ name: "issued_at",
218
+ type: "timestamptz",
219
+ nullable: true,
220
+ comment: "Momento da emiss\xE3o (DRAFT \u2192 OPEN). Nulo enquanto rascunho."
221
+ })
222
+ ], BillingInvoice.prototype, "issuedAt", 2);
223
+ __decorateClass([
224
+ Column({
225
+ name: "due_at",
226
+ type: "timestamptz",
227
+ nullable: true,
228
+ comment: "Vencimento. O job de suspens\xE3o l\xEA o prazo de gra\xE7a daqui."
229
+ })
230
+ ], BillingInvoice.prototype, "dueAt", 2);
231
+ __decorateClass([
232
+ Column({
233
+ name: "paid_at",
234
+ type: "timestamptz",
235
+ nullable: true,
236
+ comment: "Momento da quita\xE7\xE3o. Nulo enquanto n\xE3o paga."
237
+ })
238
+ ], BillingInvoice.prototype, "paidAt", 2);
239
+ __decorateClass([
240
+ Column({
241
+ name: "voided_at",
242
+ type: "timestamptz",
243
+ nullable: true,
244
+ comment: "Momento da anula\xE7\xE3o. Nulo enquanto n\xE3o anulada."
245
+ })
246
+ ], BillingInvoice.prototype, "voidedAt", 2);
247
+ __decorateClass([
248
+ CreateDateColumn({
249
+ name: "created_at",
250
+ type: "timestamptz",
251
+ comment: "Data de cria\xE7\xE3o do registro."
252
+ })
253
+ ], BillingInvoice.prototype, "createdAt", 2);
254
+ __decorateClass([
255
+ UpdateDateColumn({
256
+ name: "updated_at",
257
+ type: "timestamptz",
258
+ comment: "Data da \xFAltima atualiza\xE7\xE3o do registro."
259
+ })
260
+ ], BillingInvoice.prototype, "updatedAt", 2);
261
+ __decorateClass([
262
+ ManyToOne(() => BillingAccount, { onDelete: "RESTRICT" }),
263
+ JoinColumn({ name: "billing_account_id" })
264
+ ], BillingInvoice.prototype, "billingAccount", 2);
265
+ __decorateClass([
266
+ ManyToOne(() => BillingSubscription, { onDelete: "RESTRICT", nullable: true }),
267
+ JoinColumn({ name: "subscription_id" })
268
+ ], BillingInvoice.prototype, "subscription", 2);
269
+ __decorateClass([
270
+ OneToMany(() => BillingInvoiceLineItem, (lineItem) => lineItem.invoice)
271
+ ], BillingInvoice.prototype, "lineItems", 2);
272
+ BillingInvoice = __decorateClass([
273
+ Entity("billing_invoices"),
274
+ Unique("UQ_billing_invoices_number", ["invoiceNumber"]),
275
+ Check("CHK_billing_invoices_subtotal_non_negative", '"subtotal_amount" >= 0'),
276
+ Check("CHK_billing_invoices_discount_non_negative", '"discount_amount" >= 0'),
277
+ Check("CHK_billing_invoices_total_non_negative", '"total_amount" >= 0'),
278
+ Check("CHK_billing_invoices_amount_paid_non_negative", '"amount_paid" >= 0'),
279
+ Index("idx_billing_invoices_account", ["billingAccountId"]),
280
+ Index("idx_billing_invoices_subscription", ["subscriptionId"]),
281
+ Index("idx_billing_invoices_status", ["status"])
282
+ ], BillingInvoice);
283
+ export {
284
+ BillingInvoice
285
+ };
@@ -0,0 +1,7 @@
1
+ export declare enum BillingInvoiceStatus {
2
+ DRAFT = "draft",
3
+ OPEN = "open",
4
+ PAID = "paid",
5
+ VOID = "void"
6
+ }
7
+ //# sourceMappingURL=billing-invoice-status.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"billing-invoice-status.enum.d.ts","sourceRoot":"","sources":["../../../../src/billing/billing-invoices/enums/billing-invoice-status.enum.ts"],"names":[],"mappings":"AAkBA,oBAAY,oBAAoB;IAC9B,KAAK,UAAU;IACf,IAAI,SAAS;IACb,IAAI,SAAS;IACb,IAAI,SAAS;CACd"}
@@ -0,0 +1,10 @@
1
+ var BillingInvoiceStatus = /* @__PURE__ */ ((BillingInvoiceStatus2) => {
2
+ BillingInvoiceStatus2["DRAFT"] = "draft";
3
+ BillingInvoiceStatus2["OPEN"] = "open";
4
+ BillingInvoiceStatus2["PAID"] = "paid";
5
+ BillingInvoiceStatus2["VOID"] = "void";
6
+ return BillingInvoiceStatus2;
7
+ })(BillingInvoiceStatus || {});
8
+ export {
9
+ BillingInvoiceStatus
10
+ };
@@ -0,0 +1,3 @@
1
+ export * from './billing-invoice.entity';
2
+ export * from './enums/billing-invoice-status.enum';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/billing/billing-invoices/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,qCAAqC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./billing-invoice.entity.js";
2
+ export * from "./enums/billing-invoice-status.enum.js";
@@ -1,4 +1,6 @@
1
1
  export * from './billing-accounts';
2
+ export * from './billing-invoice-line-items';
3
+ export * from './billing-invoices';
2
4
  export * from './billing-plans';
3
5
  export * from './billing-products';
4
6
  export * from './billing-subscription-items';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/billing/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/billing/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC"}
@@ -1,4 +1,6 @@
1
1
  export * from "./billing-accounts/index.js";
2
+ export * from "./billing-invoice-line-items/index.js";
3
+ export * from "./billing-invoices/index.js";
2
4
  export * from "./billing-plans/index.js";
3
5
  export * from "./billing-products/index.js";
4
6
  export * from "./billing-subscription-items/index.js";
@@ -0,0 +1,5 @@
1
+ export declare enum MatchScoresheetSource {
2
+ LIVE = "live",
3
+ POST_MATCH = "post_match"
4
+ }
5
+ //# sourceMappingURL=match-scoresheet-source.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"match-scoresheet-source.enum.d.ts","sourceRoot":"","sources":["../../../../src/tournaments/tournament-matches/enums/match-scoresheet-source.enum.ts"],"names":[],"mappings":"AASA,oBAAY,qBAAqB;IAI/B,IAAI,SAAS;IAKb,UAAU,eAAe;CAC1B"}
@@ -0,0 +1,8 @@
1
+ var MatchScoresheetSource = /* @__PURE__ */ ((MatchScoresheetSource2) => {
2
+ MatchScoresheetSource2["LIVE"] = "live";
3
+ MatchScoresheetSource2["POST_MATCH"] = "post_match";
4
+ return MatchScoresheetSource2;
5
+ })(MatchScoresheetSource || {});
6
+ export {
7
+ MatchScoresheetSource
8
+ };
@@ -1,2 +1,3 @@
1
+ export { MatchScoresheetSource } from './enums/match-scoresheet-source.enum';
1
2
  export { TournamentMatch } from './tournament-match.entity';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-matches/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-matches/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC"}
@@ -1,4 +1,6 @@
1
+ import { MatchScoresheetSource } from "./enums/match-scoresheet-source.enum.js";
1
2
  import { TournamentMatch } from "./tournament-match.entity.js";
2
3
  export {
4
+ MatchScoresheetSource,
3
5
  TournamentMatch
4
6
  };
@@ -6,6 +6,7 @@ import { TournamentMatchGoal } from '../tournament-match-goals';
6
6
  import { TournamentPenaltyShootout } from '../tournament-penalty-shootouts';
7
7
  import { TournamentTeam } from '../tournament-teams';
8
8
  import { Tournament } from '../tournaments';
9
+ import { MatchScoresheetSource } from './enums/match-scoresheet-source.enum';
9
10
  export declare class TournamentMatch implements ITournamentMatch {
10
11
  id: number;
11
12
  tournamentId: number;
@@ -25,6 +26,7 @@ export declare class TournamentMatch implements ITournamentMatch {
25
26
  walkoverReason: string | null;
26
27
  broadcastUrl: string | null;
27
28
  startedAt: Date | null;
29
+ scoresheetSource: MatchScoresheetSource | null;
28
30
  facility?: TournamentFacility;
29
31
  tournament: Tournament;
30
32
  homeTeam: TournamentTeam;
@@ -1 +1 @@
1
- {"version":3,"file":"tournament-match.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-matches/tournament-match.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,oBAAoB,EACrB,MAAM,oCAAoC,CAAC;AAe5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,qBAsCa,eAAgB,YAAW,gBAAgB;IAItD,EAAE,EAAE,MAAM,CAAC;IAOX,YAAY,EAAE,MAAM,CAAC;IAQrB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ1B,UAAU,CAAC,EAAE,MAAM,CAAC;IASpB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAQzB,GAAG,EAAE,MAAM,CAAC;IASZ,IAAI,EAAE,MAAM,GAAG,IAAI,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E,CAAC;IAGvC,eAAe,EAAE,yBAAyB,CAAC;CAC5C"}
@@ -32,6 +32,7 @@ import { TournamentMatchGoal } from "../tournament-match-goals/index.js";
32
32
  import { TournamentPenaltyShootout } from "../tournament-penalty-shootouts/index.js";
33
33
  import { TournamentTeam } from "../tournament-teams/index.js";
34
34
  import { Tournament } from "../tournaments/index.js";
35
+ import { MatchScoresheetSource } from "./enums/match-scoresheet-source.enum.js";
35
36
  let TournamentMatch = class {
36
37
  };
37
38
  __decorateClass([
@@ -166,6 +167,16 @@ __decorateClass([
166
167
  comment: "Instante do apito inicial (SCHEDULED \u2192 IN_PROGRESS)."
167
168
  })
168
169
  ], TournamentMatch.prototype, "startedAt", 2);
170
+ __decorateClass([
171
+ Column({
172
+ name: "scoresheet_source",
173
+ type: "enum",
174
+ enum: MatchScoresheetSource,
175
+ nullable: true,
176
+ default: null,
177
+ comment: "Origem da s\xFAmula usada para finalizar a partida: ao vivo ou p\xF3s-jogo."
178
+ })
179
+ ], TournamentMatch.prototype, "scoresheetSource", 2);
169
180
  __decorateClass([
170
181
  ManyToOne(() => TournamentFacility, (facility) => facility.matches, {
171
182
  onDelete: "SET NULL"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natrave/shared-entities",
3
- "version": "7.4.0",
3
+ "version": "7.6.0",
4
4
  "description": "Entidades compartilhadass da NaTrave",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.js",