@natrave/shared-entities 8.32.0 → 8.34.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.
- package/dist/app-auth/index.d.ts +1 -0
- package/dist/app-auth/index.d.ts.map +1 -1
- package/dist/app-auth/index.js +1 -0
- package/dist/app-auth/user-localities/enums/user-locality-source.enum.d.ts +5 -0
- package/dist/app-auth/user-localities/enums/user-locality-source.enum.d.ts.map +1 -0
- package/dist/app-auth/user-localities/enums/user-locality-source.enum.js +8 -0
- package/dist/app-auth/user-localities/index.d.ts +3 -0
- package/dist/app-auth/user-localities/index.d.ts.map +1 -0
- package/dist/app-auth/user-localities/index.js +6 -0
- package/dist/app-auth/user-localities/user-locality.entity.d.ts +14 -0
- package/dist/app-auth/user-localities/user-locality.entity.d.ts.map +1 -0
- package/dist/app-auth/user-localities/user-locality.entity.js +94 -0
- package/dist/database-entities/index.d.ts +3 -2
- package/dist/database-entities/index.d.ts.map +1 -1
- package/dist/database-entities/index.js +19 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/promotions/enums/promotion-advertiser-entity-type.enum.d.ts +4 -0
- package/dist/promotions/enums/promotion-advertiser-entity-type.enum.d.ts.map +1 -0
- package/dist/promotions/enums/promotion-advertiser-entity-type.enum.js +7 -0
- package/dist/promotions/enums/promotion-creative-status.enum.d.ts +6 -0
- package/dist/promotions/enums/promotion-creative-status.enum.d.ts.map +1 -0
- package/dist/promotions/enums/promotion-creative-status.enum.js +9 -0
- package/dist/promotions/enums/promotion-creative-template.enum.d.ts +4 -0
- package/dist/promotions/enums/promotion-creative-template.enum.d.ts.map +1 -0
- package/dist/promotions/enums/promotion-creative-template.enum.js +7 -0
- package/dist/promotions/enums/promotion-event-type.enum.d.ts +7 -0
- package/dist/promotions/enums/promotion-event-type.enum.d.ts.map +1 -0
- package/dist/promotions/enums/promotion-event-type.enum.js +10 -0
- package/dist/promotions/enums/promotion-match-source.enum.d.ts +8 -0
- package/dist/promotions/enums/promotion-match-source.enum.d.ts.map +1 -0
- package/dist/promotions/enums/promotion-match-source.enum.js +11 -0
- package/dist/promotions/enums/promotion-placement.enum.d.ts +4 -0
- package/dist/promotions/enums/promotion-placement.enum.d.ts.map +1 -0
- package/dist/promotions/enums/promotion-placement.enum.js +7 -0
- package/dist/promotions/enums/promotion-status.enum.d.ts +7 -0
- package/dist/promotions/enums/promotion-status.enum.d.ts.map +1 -0
- package/dist/promotions/enums/promotion-status.enum.js +10 -0
- package/dist/promotions/enums/promotion-subject-type.enum.d.ts +4 -0
- package/dist/promotions/enums/promotion-subject-type.enum.d.ts.map +1 -0
- package/dist/promotions/enums/promotion-subject-type.enum.js +7 -0
- package/dist/promotions/enums/promotion-target-type.enum.d.ts +5 -0
- package/dist/promotions/enums/promotion-target-type.enum.d.ts.map +1 -0
- package/dist/promotions/enums/promotion-target-type.enum.js +8 -0
- package/dist/promotions/index.d.ts +18 -0
- package/dist/promotions/index.d.ts.map +1 -0
- package/dist/promotions/index.js +27 -0
- package/dist/promotions/promotion-advertisers/index.d.ts +2 -0
- package/dist/promotions/promotion-advertisers/index.d.ts.map +1 -0
- package/dist/promotions/promotion-advertisers/index.js +4 -0
- package/dist/promotions/promotion-advertisers/promotion-advertiser.entity.d.ts +15 -0
- package/dist/promotions/promotion-advertisers/promotion-advertiser.entity.d.ts.map +1 -0
- package/dist/promotions/promotion-advertisers/promotion-advertiser.entity.js +117 -0
- package/dist/promotions/promotion-contacts/index.d.ts +2 -0
- package/dist/promotions/promotion-contacts/index.d.ts.map +1 -0
- package/dist/promotions/promotion-contacts/index.js +4 -0
- package/dist/promotions/promotion-contacts/promotion-contact.entity.d.ts +14 -0
- package/dist/promotions/promotion-contacts/promotion-contact.entity.d.ts.map +1 -0
- package/dist/promotions/promotion-contacts/promotion-contact.entity.js +106 -0
- package/dist/promotions/promotion-creatives/index.d.ts +2 -0
- package/dist/promotions/promotion-creatives/index.d.ts.map +1 -0
- package/dist/promotions/promotion-creatives/index.js +4 -0
- package/dist/promotions/promotion-creatives/promotion-creative.entity.d.ts +21 -0
- package/dist/promotions/promotion-creatives/promotion-creative.entity.d.ts.map +1 -0
- package/dist/promotions/promotion-creatives/promotion-creative.entity.js +136 -0
- package/dist/promotions/promotion-events/index.d.ts +2 -0
- package/dist/promotions/promotion-events/index.d.ts.map +1 -0
- package/dist/promotions/promotion-events/index.js +4 -0
- package/dist/promotions/promotion-events/promotion-event.entity.d.ts +20 -0
- package/dist/promotions/promotion-events/promotion-event.entity.d.ts.map +1 -0
- package/dist/promotions/promotion-events/promotion-event.entity.js +135 -0
- package/dist/promotions/promotion-targets/index.d.ts +2 -0
- package/dist/promotions/promotion-targets/index.d.ts.map +1 -0
- package/dist/promotions/promotion-targets/index.js +4 -0
- package/dist/promotions/promotion-targets/promotion-target.entity.d.ts +15 -0
- package/dist/promotions/promotion-targets/promotion-target.entity.d.ts.map +1 -0
- package/dist/promotions/promotion-targets/promotion-target.entity.js +102 -0
- package/dist/promotions/promotion-user-states/index.d.ts +2 -0
- package/dist/promotions/promotion-user-states/index.d.ts.map +1 -0
- package/dist/promotions/promotion-user-states/index.js +4 -0
- package/dist/promotions/promotion-user-states/promotion-user-state.entity.d.ts +21 -0
- package/dist/promotions/promotion-user-states/promotion-user-state.entity.d.ts.map +1 -0
- package/dist/promotions/promotion-user-states/promotion-user-state.entity.js +158 -0
- package/dist/promotions/promotions/index.d.ts +2 -0
- package/dist/promotions/promotions/index.d.ts.map +1 -0
- package/dist/promotions/promotions/index.js +4 -0
- package/dist/promotions/promotions/promotion.entity.d.ts +27 -0
- package/dist/promotions/promotions/promotion.entity.d.ts.map +1 -0
- package/dist/promotions/promotions/promotion.entity.js +171 -0
- package/dist/promotions/types/promotion-content.types.d.ts +17 -0
- package/dist/promotions/types/promotion-content.types.d.ts.map +1 -0
- package/dist/promotions/types/promotion-content.types.js +0 -0
- package/dist/tournaments/tournament-category-groups/index.d.ts +1 -0
- package/dist/tournaments/tournament-category-groups/index.d.ts.map +1 -1
- package/dist/tournaments/tournament-category-groups/index.js +2 -0
- package/dist/tournaments/tournament-category-groups/tournament-category-group.entity.d.ts +1 -0
- package/dist/tournaments/tournament-category-groups/tournament-category-group.entity.d.ts.map +1 -1
- package/dist/tournaments/tournament-category-groups/tournament-category-group.entity.js +10 -0
- package/dist/tournaments/tournament-category-groups/tournament-custom-type-name.constants.d.ts +2 -0
- package/dist/tournaments/tournament-category-groups/tournament-custom-type-name.constants.d.ts.map +1 -0
- package/dist/tournaments/tournament-category-groups/tournament-custom-type-name.constants.js +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,102 @@
|
|
|
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 { City } from "../../facilities/cities/index.js";
|
|
22
|
+
import { Promotion } from "../promotions/promotion.entity.js";
|
|
23
|
+
let PromotionTarget = class {
|
|
24
|
+
};
|
|
25
|
+
__decorateClass([
|
|
26
|
+
PrimaryGeneratedColumn("uuid", {
|
|
27
|
+
primaryKeyConstraintName: "PK_promotion_targets",
|
|
28
|
+
comment: "Identificador \xFAnico da regra."
|
|
29
|
+
})
|
|
30
|
+
], PromotionTarget.prototype, "id", 2);
|
|
31
|
+
__decorateClass([
|
|
32
|
+
Column({
|
|
33
|
+
name: "promotion_id",
|
|
34
|
+
type: "uuid",
|
|
35
|
+
comment: "FK promotions.id."
|
|
36
|
+
})
|
|
37
|
+
], PromotionTarget.prototype, "promotionId", 2);
|
|
38
|
+
__decorateClass([
|
|
39
|
+
Column({
|
|
40
|
+
type: "varchar",
|
|
41
|
+
length: 16,
|
|
42
|
+
comment: "CITY | STATE. Define qual coluna de local \xE9 obrigat\xF3ria."
|
|
43
|
+
})
|
|
44
|
+
], PromotionTarget.prototype, "type", 2);
|
|
45
|
+
__decorateClass([
|
|
46
|
+
Column({
|
|
47
|
+
name: "city_ibge_code",
|
|
48
|
+
type: "int",
|
|
49
|
+
nullable: true,
|
|
50
|
+
comment: "FK cities.ibge_code. Munic\xEDpio alvo quando type = CITY."
|
|
51
|
+
})
|
|
52
|
+
], PromotionTarget.prototype, "cityIbgeCode", 2);
|
|
53
|
+
__decorateClass([
|
|
54
|
+
Column({
|
|
55
|
+
type: "varchar",
|
|
56
|
+
length: 2,
|
|
57
|
+
nullable: true,
|
|
58
|
+
comment: "UF alvo quando type = STATE."
|
|
59
|
+
})
|
|
60
|
+
], PromotionTarget.prototype, "state", 2);
|
|
61
|
+
__decorateClass([
|
|
62
|
+
CreateDateColumn({
|
|
63
|
+
name: "created_at",
|
|
64
|
+
type: "timestamptz",
|
|
65
|
+
default: () => "now()",
|
|
66
|
+
comment: "Data/hora de cria\xE7\xE3o do registro."
|
|
67
|
+
})
|
|
68
|
+
], PromotionTarget.prototype, "createdAt", 2);
|
|
69
|
+
__decorateClass([
|
|
70
|
+
ManyToOne(() => Promotion, (promotion) => promotion.targets, { onDelete: "CASCADE" }),
|
|
71
|
+
JoinColumn({
|
|
72
|
+
name: "promotion_id",
|
|
73
|
+
foreignKeyConstraintName: "FK_promotion_targets_promotion"
|
|
74
|
+
})
|
|
75
|
+
], PromotionTarget.prototype, "promotion", 2);
|
|
76
|
+
__decorateClass([
|
|
77
|
+
ManyToOne(() => City, { onDelete: "RESTRICT" }),
|
|
78
|
+
JoinColumn({
|
|
79
|
+
name: "city_ibge_code",
|
|
80
|
+
referencedColumnName: "ibgeCode",
|
|
81
|
+
foreignKeyConstraintName: "FK_promotion_targets_city"
|
|
82
|
+
})
|
|
83
|
+
], PromotionTarget.prototype, "city", 2);
|
|
84
|
+
PromotionTarget = __decorateClass([
|
|
85
|
+
Entity("promotion_targets"),
|
|
86
|
+
Index("UQ_promotion_targets_city", ["promotionId", "cityIbgeCode"], {
|
|
87
|
+
unique: true,
|
|
88
|
+
where: `"type" = 'CITY'`
|
|
89
|
+
}),
|
|
90
|
+
Index("UQ_promotion_targets_state", ["promotionId", "state"], {
|
|
91
|
+
unique: true,
|
|
92
|
+
where: `"type" = 'STATE'`
|
|
93
|
+
}),
|
|
94
|
+
Index("IDX_promotion_targets_city", ["cityIbgeCode"]),
|
|
95
|
+
Check(
|
|
96
|
+
"CHK_promotion_targets_shape",
|
|
97
|
+
`("type" = 'CITY' AND "city_ibge_code" IS NOT NULL AND "state" IS NULL) OR ("type" = 'STATE' AND "state" IS NOT NULL AND "city_ibge_code" IS NULL)`
|
|
98
|
+
)
|
|
99
|
+
], PromotionTarget);
|
|
100
|
+
export {
|
|
101
|
+
PromotionTarget
|
|
102
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/promotions/promotion-user-states/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { User } from '../../app-auth';
|
|
2
|
+
import { PromotionCreative } from '../promotion-creatives/promotion-creative.entity';
|
|
3
|
+
import { Promotion } from '../promotions/promotion.entity';
|
|
4
|
+
export declare class PromotionUserState {
|
|
5
|
+
promotionId: string;
|
|
6
|
+
userId: string;
|
|
7
|
+
creativeId: string | null;
|
|
8
|
+
impressions: number;
|
|
9
|
+
firstShownAt: Date | null;
|
|
10
|
+
lastShownAt: Date | null;
|
|
11
|
+
dismissedAt: Date | null;
|
|
12
|
+
interestedAt: Date | null;
|
|
13
|
+
leadDeliveredAt: Date | null;
|
|
14
|
+
contactClickedAt: Date | null;
|
|
15
|
+
createdAt: Date;
|
|
16
|
+
updatedAt: Date;
|
|
17
|
+
promotion: Promotion;
|
|
18
|
+
user: User;
|
|
19
|
+
creative: PromotionCreative | null;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=promotion-user-state.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promotion-user-state.entity.d.ts","sourceRoot":"","sources":["../../../src/promotions/promotion-user-states/promotion-user-state.entity.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AACrF,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAqB3D,qBAWa,kBAAkB;IAO7B,WAAW,EAAE,MAAM,CAAC;IAQpB,MAAM,EAAE,MAAM,CAAC;IAQf,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAO1B,WAAW,EAAE,MAAM,CAAC;IAQpB,YAAY,EAAE,IAAI,GAAG,IAAI,CAAC;IAQ1B,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IAQzB,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IAQzB,YAAY,EAAE,IAAI,GAAG,IAAI,CAAC;IAQ1B,eAAe,EAAE,IAAI,GAAG,IAAI,CAAC;IAQ7B,gBAAgB,EAAE,IAAI,GAAG,IAAI,CAAC;IAQ9B,SAAS,EAAE,IAAI,CAAC;IAQhB,SAAS,EAAE,IAAI,CAAC;IAShB,SAAS,EAAE,SAAS,CAAC;IAOrB,IAAI,EAAE,IAAI,CAAC;IAOX,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAC;CACpC"}
|
|
@@ -0,0 +1,158 @@
|
|
|
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
|
+
PrimaryColumn,
|
|
20
|
+
UpdateDateColumn
|
|
21
|
+
} from "typeorm";
|
|
22
|
+
import { User } from "../../app-auth/index.js";
|
|
23
|
+
import { PromotionCreative } from "../promotion-creatives/promotion-creative.entity.js";
|
|
24
|
+
import { Promotion } from "../promotions/promotion.entity.js";
|
|
25
|
+
let PromotionUserState = class {
|
|
26
|
+
};
|
|
27
|
+
__decorateClass([
|
|
28
|
+
PrimaryColumn({
|
|
29
|
+
name: "promotion_id",
|
|
30
|
+
type: "uuid",
|
|
31
|
+
primaryKeyConstraintName: "PK_promotion_user_states",
|
|
32
|
+
comment: "FK promotions.id."
|
|
33
|
+
})
|
|
34
|
+
], PromotionUserState.prototype, "promotionId", 2);
|
|
35
|
+
__decorateClass([
|
|
36
|
+
PrimaryColumn({
|
|
37
|
+
name: "user_id",
|
|
38
|
+
type: "uuid",
|
|
39
|
+
primaryKeyConstraintName: "PK_promotion_user_states",
|
|
40
|
+
comment: "FK users.id."
|
|
41
|
+
})
|
|
42
|
+
], PromotionUserState.prototype, "userId", 2);
|
|
43
|
+
__decorateClass([
|
|
44
|
+
Column({
|
|
45
|
+
name: "creative_id",
|
|
46
|
+
type: "uuid",
|
|
47
|
+
nullable: true,
|
|
48
|
+
comment: "FK promotion_creatives.id. Criativo sorteado para este usu\xE1rio."
|
|
49
|
+
})
|
|
50
|
+
], PromotionUserState.prototype, "creativeId", 2);
|
|
51
|
+
__decorateClass([
|
|
52
|
+
Column({
|
|
53
|
+
type: "int",
|
|
54
|
+
default: 0,
|
|
55
|
+
comment: "Quantas vezes o destaque abriu para este usu\xE1rio."
|
|
56
|
+
})
|
|
57
|
+
], PromotionUserState.prototype, "impressions", 2);
|
|
58
|
+
__decorateClass([
|
|
59
|
+
Column({
|
|
60
|
+
name: "first_shown_at",
|
|
61
|
+
type: "timestamptz",
|
|
62
|
+
nullable: true,
|
|
63
|
+
comment: "Data/hora da primeira exibi\xE7\xE3o."
|
|
64
|
+
})
|
|
65
|
+
], PromotionUserState.prototype, "firstShownAt", 2);
|
|
66
|
+
__decorateClass([
|
|
67
|
+
Column({
|
|
68
|
+
name: "last_shown_at",
|
|
69
|
+
type: "timestamptz",
|
|
70
|
+
nullable: true,
|
|
71
|
+
comment: "Data/hora da \xFAltima exibi\xE7\xE3o. Base do intervalo entre destaques."
|
|
72
|
+
})
|
|
73
|
+
], PromotionUserState.prototype, "lastShownAt", 2);
|
|
74
|
+
__decorateClass([
|
|
75
|
+
Column({
|
|
76
|
+
name: "dismissed_at",
|
|
77
|
+
type: "timestamptz",
|
|
78
|
+
nullable: true,
|
|
79
|
+
comment: 'Quando recusou ("Agora n\xE3o" ou fechar). O destaque n\xE3o volta.'
|
|
80
|
+
})
|
|
81
|
+
], PromotionUserState.prototype, "dismissedAt", 2);
|
|
82
|
+
__decorateClass([
|
|
83
|
+
Column({
|
|
84
|
+
name: "interested_at",
|
|
85
|
+
type: "timestamptz",
|
|
86
|
+
nullable: true,
|
|
87
|
+
comment: 'Quando tocou em "Tenho interesse". Lead para o organizador.'
|
|
88
|
+
})
|
|
89
|
+
], PromotionUserState.prototype, "interestedAt", 2);
|
|
90
|
+
__decorateClass([
|
|
91
|
+
Column({
|
|
92
|
+
name: "lead_delivered_at",
|
|
93
|
+
type: "timestamptz",
|
|
94
|
+
nullable: true,
|
|
95
|
+
comment: "Quando o lead foi repassado ao organizador. Nulo: ainda n\xE3o enviado."
|
|
96
|
+
})
|
|
97
|
+
], PromotionUserState.prototype, "leadDeliveredAt", 2);
|
|
98
|
+
__decorateClass([
|
|
99
|
+
Column({
|
|
100
|
+
name: "contact_clicked_at",
|
|
101
|
+
type: "timestamptz",
|
|
102
|
+
nullable: true,
|
|
103
|
+
comment: "Primeira vez que abriu o contato do organizador."
|
|
104
|
+
})
|
|
105
|
+
], PromotionUserState.prototype, "contactClickedAt", 2);
|
|
106
|
+
__decorateClass([
|
|
107
|
+
CreateDateColumn({
|
|
108
|
+
name: "created_at",
|
|
109
|
+
type: "timestamptz",
|
|
110
|
+
default: () => "now()",
|
|
111
|
+
comment: "Data/hora de cria\xE7\xE3o do registro."
|
|
112
|
+
})
|
|
113
|
+
], PromotionUserState.prototype, "createdAt", 2);
|
|
114
|
+
__decorateClass([
|
|
115
|
+
UpdateDateColumn({
|
|
116
|
+
name: "updated_at",
|
|
117
|
+
type: "timestamptz",
|
|
118
|
+
default: () => "now()",
|
|
119
|
+
comment: "Data/hora da \xFAltima altera\xE7\xE3o do registro."
|
|
120
|
+
})
|
|
121
|
+
], PromotionUserState.prototype, "updatedAt", 2);
|
|
122
|
+
__decorateClass([
|
|
123
|
+
ManyToOne(() => Promotion, { onDelete: "CASCADE" }),
|
|
124
|
+
JoinColumn({
|
|
125
|
+
name: "promotion_id",
|
|
126
|
+
foreignKeyConstraintName: "FK_promotion_user_states_promotion"
|
|
127
|
+
})
|
|
128
|
+
], PromotionUserState.prototype, "promotion", 2);
|
|
129
|
+
__decorateClass([
|
|
130
|
+
ManyToOne(() => User, { onDelete: "CASCADE" }),
|
|
131
|
+
JoinColumn({
|
|
132
|
+
name: "user_id",
|
|
133
|
+
foreignKeyConstraintName: "FK_promotion_user_states_user"
|
|
134
|
+
})
|
|
135
|
+
], PromotionUserState.prototype, "user", 2);
|
|
136
|
+
__decorateClass([
|
|
137
|
+
ManyToOne(() => PromotionCreative, { onDelete: "NO ACTION" }),
|
|
138
|
+
JoinColumn({
|
|
139
|
+
name: "creative_id",
|
|
140
|
+
foreignKeyConstraintName: "FK_promotion_user_states_creative"
|
|
141
|
+
})
|
|
142
|
+
], PromotionUserState.prototype, "creative", 2);
|
|
143
|
+
PromotionUserState = __decorateClass([
|
|
144
|
+
Entity("promotion_user_states"),
|
|
145
|
+
Index("IDX_promotion_user_states_user_last_shown", ["userId", "lastShownAt"]),
|
|
146
|
+
Index("IDX_promotion_user_states_leads", ["promotionId", "interestedAt"], {
|
|
147
|
+
where: '"interested_at" IS NOT NULL'
|
|
148
|
+
}),
|
|
149
|
+
Check("CHK_promotion_user_states_impressions", `"impressions" >= 0`),
|
|
150
|
+
Check("CHK_promotion_user_states_creative", `"impressions" = 0 OR "creative_id" IS NOT NULL`),
|
|
151
|
+
Check(
|
|
152
|
+
"CHK_promotion_user_states_delivery",
|
|
153
|
+
`"lead_delivered_at" IS NULL OR "interested_at" IS NOT NULL`
|
|
154
|
+
)
|
|
155
|
+
], PromotionUserState);
|
|
156
|
+
export {
|
|
157
|
+
PromotionUserState
|
|
158
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/promotions/promotions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { PromotionStatus } from '../enums/promotion-status.enum';
|
|
2
|
+
import { PromotionSubjectType } from '../enums/promotion-subject-type.enum';
|
|
3
|
+
import { PromotionAdvertiser } from '../promotion-advertisers/promotion-advertiser.entity';
|
|
4
|
+
import { PromotionContact } from '../promotion-contacts/promotion-contact.entity';
|
|
5
|
+
import { PromotionCreative } from '../promotion-creatives/promotion-creative.entity';
|
|
6
|
+
import { PromotionTarget } from '../promotion-targets/promotion-target.entity';
|
|
7
|
+
export declare class Promotion {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
status: PromotionStatus;
|
|
11
|
+
advertiserId: string;
|
|
12
|
+
subjectType: PromotionSubjectType | null;
|
|
13
|
+
subjectId: string | null;
|
|
14
|
+
startsAt: Date;
|
|
15
|
+
endsAt: Date;
|
|
16
|
+
priority: number;
|
|
17
|
+
maxImpressionsPerUser: number;
|
|
18
|
+
contractRef: string | null;
|
|
19
|
+
createdBy: string | null;
|
|
20
|
+
createdAt: Date;
|
|
21
|
+
updatedAt: Date;
|
|
22
|
+
advertiser: PromotionAdvertiser;
|
|
23
|
+
targets: PromotionTarget[];
|
|
24
|
+
creatives: PromotionCreative[];
|
|
25
|
+
contacts: PromotionContact[];
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=promotion.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promotion.entity.d.ts","sourceRoot":"","sources":["../../../src/promotions/promotions/promotion.entity.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAC3F,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AACrF,OAAO,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AA6B/E,qBAYa,SAAS;IAKpB,EAAE,EAAE,MAAM,CAAC;IAOX,IAAI,EAAE,MAAM,CAAC;IAQb,MAAM,EAAE,eAAe,CAAC;IAOxB,YAAY,EAAE,MAAM,CAAC;IASrB,WAAW,EAAE,oBAAoB,GAAG,IAAI,CAAC;IASzC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAOzB,QAAQ,EAAE,IAAI,CAAC;IAOf,MAAM,EAAE,IAAI,CAAC;IAOb,QAAQ,EAAE,MAAM,CAAC;IAQjB,qBAAqB,EAAE,MAAM,CAAC;IAS9B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAS3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAQzB,SAAS,EAAE,IAAI,CAAC;IAQhB,SAAS,EAAE,IAAI,CAAC;IAWhB,UAAU,EAAE,mBAAmB,CAAC;IAGhC,OAAO,EAAE,eAAe,EAAE,CAAC;IAG3B,SAAS,EAAE,iBAAiB,EAAE,CAAC;IAG/B,QAAQ,EAAE,gBAAgB,EAAE,CAAC;CAC9B"}
|
|
@@ -0,0 +1,171 @@
|
|
|
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
|
+
OneToMany,
|
|
20
|
+
PrimaryGeneratedColumn,
|
|
21
|
+
UpdateDateColumn
|
|
22
|
+
} from "typeorm";
|
|
23
|
+
import { PromotionStatus } from "../enums/promotion-status.enum.js";
|
|
24
|
+
import { PromotionAdvertiser } from "../promotion-advertisers/promotion-advertiser.entity.js";
|
|
25
|
+
import { PromotionContact } from "../promotion-contacts/promotion-contact.entity.js";
|
|
26
|
+
import { PromotionCreative } from "../promotion-creatives/promotion-creative.entity.js";
|
|
27
|
+
import { PromotionTarget } from "../promotion-targets/promotion-target.entity.js";
|
|
28
|
+
let Promotion = class {
|
|
29
|
+
};
|
|
30
|
+
__decorateClass([
|
|
31
|
+
PrimaryGeneratedColumn("uuid", {
|
|
32
|
+
primaryKeyConstraintName: "PK_promotions",
|
|
33
|
+
comment: "Identificador \xFAnico do destaque."
|
|
34
|
+
})
|
|
35
|
+
], Promotion.prototype, "id", 2);
|
|
36
|
+
__decorateClass([
|
|
37
|
+
Column({
|
|
38
|
+
type: "varchar",
|
|
39
|
+
length: 120,
|
|
40
|
+
comment: "Nome interno do destaque no backoffice. N\xE3o aparece no app."
|
|
41
|
+
})
|
|
42
|
+
], Promotion.prototype, "name", 2);
|
|
43
|
+
__decorateClass([
|
|
44
|
+
Column({
|
|
45
|
+
type: "varchar",
|
|
46
|
+
length: 16,
|
|
47
|
+
default: PromotionStatus.DRAFT,
|
|
48
|
+
comment: "DRAFT | ACTIVE | PAUSED | ENDED. S\xF3 ACTIVE dentro da janela aparece."
|
|
49
|
+
})
|
|
50
|
+
], Promotion.prototype, "status", 2);
|
|
51
|
+
__decorateClass([
|
|
52
|
+
Column({
|
|
53
|
+
name: "advertiser_id",
|
|
54
|
+
type: "uuid",
|
|
55
|
+
comment: "FK promotion_advertisers.id. Quem pagou pelo destaque."
|
|
56
|
+
})
|
|
57
|
+
], Promotion.prototype, "advertiserId", 2);
|
|
58
|
+
__decorateClass([
|
|
59
|
+
Column({
|
|
60
|
+
name: "subject_type",
|
|
61
|
+
type: "varchar",
|
|
62
|
+
length: 32,
|
|
63
|
+
nullable: true,
|
|
64
|
+
comment: "Tipo do que \xE9 anunciado (TOURNAMENT). Nulo: destaque sem assunto."
|
|
65
|
+
})
|
|
66
|
+
], Promotion.prototype, "subjectType", 2);
|
|
67
|
+
__decorateClass([
|
|
68
|
+
Column({
|
|
69
|
+
name: "subject_id",
|
|
70
|
+
type: "bigint",
|
|
71
|
+
nullable: true,
|
|
72
|
+
comment: "Id do assunto em subject_type (TOURNAMENT: tournament_category_groups.id). Sem FK (polim\xF3rfico)."
|
|
73
|
+
})
|
|
74
|
+
], Promotion.prototype, "subjectId", 2);
|
|
75
|
+
__decorateClass([
|
|
76
|
+
Column({
|
|
77
|
+
name: "starts_at",
|
|
78
|
+
type: "timestamptz",
|
|
79
|
+
comment: "In\xEDcio da janela em que o destaque pode aparecer."
|
|
80
|
+
})
|
|
81
|
+
], Promotion.prototype, "startsAt", 2);
|
|
82
|
+
__decorateClass([
|
|
83
|
+
Column({
|
|
84
|
+
name: "ends_at",
|
|
85
|
+
type: "timestamptz",
|
|
86
|
+
comment: "Fim da janela (exclusivo). Depois disso n\xE3o aparece mais."
|
|
87
|
+
})
|
|
88
|
+
], Promotion.prototype, "endsAt", 2);
|
|
89
|
+
__decorateClass([
|
|
90
|
+
Column({
|
|
91
|
+
type: "int",
|
|
92
|
+
default: 0,
|
|
93
|
+
comment: "Desempate quando mais de um destaque serve ao mesmo usu\xE1rio. Maior vence."
|
|
94
|
+
})
|
|
95
|
+
], Promotion.prototype, "priority", 2);
|
|
96
|
+
__decorateClass([
|
|
97
|
+
Column({
|
|
98
|
+
name: "max_impressions_per_user",
|
|
99
|
+
type: "int",
|
|
100
|
+
default: 1,
|
|
101
|
+
comment: "Quantas vezes o mesmo usu\xE1rio pode ver este destaque, somando os criativos."
|
|
102
|
+
})
|
|
103
|
+
], Promotion.prototype, "maxImpressionsPerUser", 2);
|
|
104
|
+
__decorateClass([
|
|
105
|
+
Column({
|
|
106
|
+
name: "contract_ref",
|
|
107
|
+
type: "varchar",
|
|
108
|
+
length: 120,
|
|
109
|
+
nullable: true,
|
|
110
|
+
comment: "Refer\xEAncia externa da venda (proposta, nota, contrato)."
|
|
111
|
+
})
|
|
112
|
+
], Promotion.prototype, "contractRef", 2);
|
|
113
|
+
__decorateClass([
|
|
114
|
+
Column({
|
|
115
|
+
name: "created_by",
|
|
116
|
+
type: "varchar",
|
|
117
|
+
length: 64,
|
|
118
|
+
nullable: true,
|
|
119
|
+
comment: "Usu\xE1rio do backoffice que criou o destaque."
|
|
120
|
+
})
|
|
121
|
+
], Promotion.prototype, "createdBy", 2);
|
|
122
|
+
__decorateClass([
|
|
123
|
+
CreateDateColumn({
|
|
124
|
+
name: "created_at",
|
|
125
|
+
type: "timestamptz",
|
|
126
|
+
default: () => "now()",
|
|
127
|
+
comment: "Data/hora de cria\xE7\xE3o do registro."
|
|
128
|
+
})
|
|
129
|
+
], Promotion.prototype, "createdAt", 2);
|
|
130
|
+
__decorateClass([
|
|
131
|
+
UpdateDateColumn({
|
|
132
|
+
name: "updated_at",
|
|
133
|
+
type: "timestamptz",
|
|
134
|
+
default: () => "now()",
|
|
135
|
+
comment: "Data/hora da \xFAltima altera\xE7\xE3o do registro."
|
|
136
|
+
})
|
|
137
|
+
], Promotion.prototype, "updatedAt", 2);
|
|
138
|
+
__decorateClass([
|
|
139
|
+
ManyToOne(() => PromotionAdvertiser, (advertiser) => advertiser.promotions, {
|
|
140
|
+
onDelete: "RESTRICT"
|
|
141
|
+
}),
|
|
142
|
+
JoinColumn({
|
|
143
|
+
name: "advertiser_id",
|
|
144
|
+
foreignKeyConstraintName: "FK_promotions_advertiser"
|
|
145
|
+
})
|
|
146
|
+
], Promotion.prototype, "advertiser", 2);
|
|
147
|
+
__decorateClass([
|
|
148
|
+
OneToMany(() => PromotionTarget, (target) => target.promotion)
|
|
149
|
+
], Promotion.prototype, "targets", 2);
|
|
150
|
+
__decorateClass([
|
|
151
|
+
OneToMany(() => PromotionCreative, (creative) => creative.promotion)
|
|
152
|
+
], Promotion.prototype, "creatives", 2);
|
|
153
|
+
__decorateClass([
|
|
154
|
+
OneToMany(() => PromotionContact, (contact) => contact.promotion)
|
|
155
|
+
], Promotion.prototype, "contacts", 2);
|
|
156
|
+
Promotion = __decorateClass([
|
|
157
|
+
Entity("promotions"),
|
|
158
|
+
Index("IDX_promotions_live", ["status", "endsAt"]),
|
|
159
|
+
Index("IDX_promotions_subject", ["subjectType", "subjectId"]),
|
|
160
|
+
Index("IDX_promotions_advertiser", ["advertiserId"]),
|
|
161
|
+
Check("CHK_promotions_status", `"status" IN ('DRAFT', 'ACTIVE', 'PAUSED', 'ENDED')`),
|
|
162
|
+
Check(
|
|
163
|
+
"CHK_promotions_subject",
|
|
164
|
+
`("subject_type" IS NULL AND "subject_id" IS NULL) OR ("subject_type" IS NOT NULL AND "subject_type" IN ('TOURNAMENT') AND "subject_id" IS NOT NULL)`
|
|
165
|
+
),
|
|
166
|
+
Check("CHK_promotions_window", `"ends_at" > "starts_at"`),
|
|
167
|
+
Check("CHK_promotions_max_impressions", `"max_impressions_per_user" >= 1`)
|
|
168
|
+
], Promotion);
|
|
169
|
+
export {
|
|
170
|
+
Promotion
|
|
171
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { PromotionCreativeTemplate } from '../enums/promotion-creative-template.enum';
|
|
2
|
+
export interface TournamentPosterContent {
|
|
3
|
+
posterColor: string;
|
|
4
|
+
monogram: string;
|
|
5
|
+
posterImageUrl?: string;
|
|
6
|
+
headline?: string;
|
|
7
|
+
kicker?: string;
|
|
8
|
+
badge?: string;
|
|
9
|
+
ctaLabel: string;
|
|
10
|
+
dismissLabel: string;
|
|
11
|
+
contactMessage?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface PromotionCreativeContentByTemplate {
|
|
14
|
+
[PromotionCreativeTemplate.TOURNAMENT_POSTER]: TournamentPosterContent;
|
|
15
|
+
}
|
|
16
|
+
export type PromotionCreativeContent = PromotionCreativeContentByTemplate[keyof PromotionCreativeContentByTemplate];
|
|
17
|
+
//# sourceMappingURL=promotion-content.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promotion-content.types.d.ts","sourceRoot":"","sources":["../../../src/promotions/types/promotion-content.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAC;AAS3F,MAAM,WAAW,uBAAuB;IAEtC,WAAW,EAAE,MAAM,CAAC;IAEpB,QAAQ,EAAE,MAAM,CAAC;IAEjB,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,QAAQ,EAAE,MAAM,CAAC;IAEjB,YAAY,EAAE,MAAM,CAAC;IAErB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAMD,MAAM,WAAW,kCAAkC;IACjD,CAAC,yBAAyB,CAAC,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CACxE;AAGD,MAAM,MAAM,wBAAwB,GAClC,kCAAkC,CAAC,MAAM,kCAAkC,CAAC,CAAC"}
|
|
File without changes
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { TournamentCreationFlow } from './enums/tournament-creation-flow.enum';
|
|
2
2
|
export { TournamentType } from './enums/tournament-type.enum';
|
|
3
3
|
export { TournamentCategoryGroup } from './tournament-category-group.entity';
|
|
4
|
+
export { TOURNAMENT_CUSTOM_TYPE_NAME_MAX_LENGTH } from './tournament-custom-type-name.constants';
|
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-category-groups/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-category-groups/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,sCAAsC,EAAE,MAAM,yCAAyC,CAAC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { TournamentCreationFlow } from "./enums/tournament-creation-flow.enum.js";
|
|
2
2
|
import { TournamentType } from "./enums/tournament-type.enum.js";
|
|
3
3
|
import { TournamentCategoryGroup } from "./tournament-category-group.entity.js";
|
|
4
|
+
import { TOURNAMENT_CUSTOM_TYPE_NAME_MAX_LENGTH } from "./tournament-custom-type-name.constants.js";
|
|
4
5
|
export {
|
|
6
|
+
TOURNAMENT_CUSTOM_TYPE_NAME_MAX_LENGTH,
|
|
5
7
|
TournamentCategoryGroup,
|
|
6
8
|
TournamentCreationFlow,
|
|
7
9
|
TournamentType
|
|
@@ -9,6 +9,7 @@ export declare class TournamentCategoryGroup {
|
|
|
9
9
|
tournamentGroupImage?: string | null;
|
|
10
10
|
tournamentPrimaryColor: string;
|
|
11
11
|
type?: TournamentType | null;
|
|
12
|
+
customTypeName?: string | null;
|
|
12
13
|
creationFlow?: TournamentCreationFlow | null;
|
|
13
14
|
organizationId?: number | null;
|
|
14
15
|
createdAt: Date;
|
package/dist/tournaments/tournament-category-groups/tournament-category-group.entity.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tournament-category-group.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-category-groups/tournament-category-group.entity.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"tournament-category-group.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-category-groups/tournament-category-group.entity.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAkB9D,qBAGa,uBAAuB;IAIlC,EAAE,EAAE,MAAM,CAAC;IAGX,IAAI,EAAE,MAAM,CAAC;IAQb,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IASrC,sBAAsB,EAAE,MAAM,CAAC;IAW/B,IAAI,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IAY7B,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAY/B,YAAY,CAAC,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAQ7C,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAO/B,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAQhB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IAQvB,SAAS,EAAE,YAAY,CAAC;IAIxB,UAAU,EAAE,UAAU,EAAE,CAAC;IAIzB,QAAQ,EAAE,sBAAsB,EAAE,CAAC;CACpC"}
|
|
@@ -25,6 +25,7 @@ import { TournamentGroupContact } from "../tournament-group-contacts/index.js";
|
|
|
25
25
|
import { Tournament } from "../tournaments/index.js";
|
|
26
26
|
import { TournamentCreationFlow } from "./enums/tournament-creation-flow.enum.js";
|
|
27
27
|
import { TournamentType } from "./enums/tournament-type.enum.js";
|
|
28
|
+
import { TOURNAMENT_CUSTOM_TYPE_NAME_MAX_LENGTH } from "./tournament-custom-type-name.constants.js";
|
|
28
29
|
let TournamentCategoryGroup = class {
|
|
29
30
|
};
|
|
30
31
|
__decorateClass([
|
|
@@ -60,6 +61,15 @@ __decorateClass([
|
|
|
60
61
|
comment: "Tipo do campeonato: o contexto de quem organiza (escolinha, liga, empresarial...), n\xE3o a modalidade nem o formato. Nulo nos agrupadores criados antes do campo existir \u2014 que \xE9 diferente de `other`, onde o organizador viu a lista e nenhuma op\xE7\xE3o serviu."
|
|
61
62
|
})
|
|
62
63
|
], TournamentCategoryGroup.prototype, "type", 2);
|
|
64
|
+
__decorateClass([
|
|
65
|
+
Column({
|
|
66
|
+
name: "custom_type_name",
|
|
67
|
+
type: "varchar",
|
|
68
|
+
length: TOURNAMENT_CUSTOM_TYPE_NAME_MAX_LENGTH,
|
|
69
|
+
nullable: true,
|
|
70
|
+
comment: "Nome do tipo escrito pelo organizador quando nenhuma op\xE7\xE3o da lista serviu. S\xF3 \xE9 preenchido com `type = other`; nulo nos demais casos. Texto livre: serve para descobrir qual op\xE7\xE3o falta no enum, nenhuma regra de neg\xF3cio depende dele."
|
|
71
|
+
})
|
|
72
|
+
], TournamentCategoryGroup.prototype, "customTypeName", 2);
|
|
63
73
|
__decorateClass([
|
|
64
74
|
Column({
|
|
65
75
|
name: "creation_flow",
|
package/dist/tournaments/tournament-category-groups/tournament-custom-type-name.constants.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tournament-custom-type-name.constants.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-category-groups/tournament-custom-type-name.constants.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,sCAAsC,KAAK,CAAC"}
|