@natrave/shared-entities 1.2.39 → 1.2.40
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,11 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import { EmailTemplateName, IEmailTemplate } from '@natrave/notification-service-types';
|
|
2
|
+
export declare class EmailTemplate implements IEmailTemplate {
|
|
2
3
|
id: string;
|
|
3
4
|
createdAt: Date;
|
|
4
5
|
updatedAt: Date;
|
|
5
|
-
name:
|
|
6
|
+
name: EmailTemplateName;
|
|
6
7
|
subject: string;
|
|
7
8
|
body: string;
|
|
8
9
|
isActive: boolean;
|
|
9
|
-
normalizeName(): void;
|
|
10
10
|
}
|
|
11
11
|
//# sourceMappingURL=email-template.entity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email-template.entity.d.ts","sourceRoot":"","sources":["../../../src/notifications/email-templates/email-template.entity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"email-template.entity.d.ts","sourceRoot":"","sources":["../../../src/notifications/email-templates/email-template.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAWxF,qBAGa,aAAc,YAAW,cAAc;IAElD,EAAE,EAAE,MAAM,CAAC;IAOX,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAOhB,IAAI,EAAE,iBAAiB,CAAC;IAGxB,OAAO,EAAE,MAAM,CAAC;IAGhB,IAAI,EAAE,MAAM,CAAC;IAQb,QAAQ,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -8,9 +8,8 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
8
8
|
if (kind && result) __defProp(target, key, result);
|
|
9
9
|
return result;
|
|
10
10
|
};
|
|
11
|
+
import { EmailTemplateName } from "@natrave/notification-service-types";
|
|
11
12
|
import {
|
|
12
|
-
BeforeInsert,
|
|
13
|
-
BeforeUpdate,
|
|
14
13
|
Column,
|
|
15
14
|
CreateDateColumn,
|
|
16
15
|
Entity,
|
|
@@ -20,35 +19,45 @@ import {
|
|
|
20
19
|
UpdateDateColumn
|
|
21
20
|
} from "typeorm";
|
|
22
21
|
let EmailTemplate = class {
|
|
23
|
-
normalizeName() {
|
|
24
|
-
this.name = this.name.trim();
|
|
25
|
-
}
|
|
26
22
|
};
|
|
27
23
|
__decorateClass([
|
|
28
24
|
PrimaryGeneratedColumn("uuid")
|
|
29
25
|
], EmailTemplate.prototype, "id", 2);
|
|
30
26
|
__decorateClass([
|
|
31
|
-
CreateDateColumn({
|
|
27
|
+
CreateDateColumn({
|
|
28
|
+
name: "created_at",
|
|
29
|
+
type: "timestamptz",
|
|
30
|
+
comment: "Data de cria\xE7\xE3o do template."
|
|
31
|
+
})
|
|
32
32
|
], EmailTemplate.prototype, "createdAt", 2);
|
|
33
33
|
__decorateClass([
|
|
34
|
-
UpdateDateColumn({
|
|
34
|
+
UpdateDateColumn({
|
|
35
|
+
name: "updated_at",
|
|
36
|
+
type: "timestamptz",
|
|
37
|
+
comment: "Data de atualiza\xE7\xE3o do template."
|
|
38
|
+
})
|
|
35
39
|
], EmailTemplate.prototype, "updatedAt", 2);
|
|
36
40
|
__decorateClass([
|
|
37
|
-
Column({
|
|
41
|
+
Column({
|
|
42
|
+
type: "enum",
|
|
43
|
+
enum: EmailTemplateName,
|
|
44
|
+
comment: "Nome do template de e-mail."
|
|
45
|
+
})
|
|
38
46
|
], EmailTemplate.prototype, "name", 2);
|
|
39
47
|
__decorateClass([
|
|
40
|
-
Column({ type: "varchar", length: 255 })
|
|
48
|
+
Column({ type: "varchar", length: 255, comment: "Assunto do e-mail." })
|
|
41
49
|
], EmailTemplate.prototype, "subject", 2);
|
|
42
50
|
__decorateClass([
|
|
43
|
-
Column({ type: "text" })
|
|
51
|
+
Column({ type: "text", comment: "Corpo do e-mail." })
|
|
44
52
|
], EmailTemplate.prototype, "body", 2);
|
|
45
53
|
__decorateClass([
|
|
46
|
-
Column({
|
|
54
|
+
Column({
|
|
55
|
+
name: "is_active",
|
|
56
|
+
type: "boolean",
|
|
57
|
+
default: true,
|
|
58
|
+
comment: "Indica se o template est\xE1 ativo ou n\xE3o."
|
|
59
|
+
})
|
|
47
60
|
], EmailTemplate.prototype, "isActive", 2);
|
|
48
|
-
__decorateClass([
|
|
49
|
-
BeforeInsert(),
|
|
50
|
-
BeforeUpdate()
|
|
51
|
-
], EmailTemplate.prototype, "normalizeName", 1);
|
|
52
61
|
EmailTemplate = __decorateClass([
|
|
53
62
|
Entity("email_templates"),
|
|
54
63
|
Unique(["name"]),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@natrave/shared-entities",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.40",
|
|
4
4
|
"description": "Entidades compartilhadass da NaTrave",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@natrave/auth-service-types": "^1.1.61",
|
|
47
|
+
"@natrave/notification-service-types": "^1.1.65",
|
|
47
48
|
"@natrave/tournaments-service-types": "^1.1.63",
|
|
48
49
|
"reflect-metadata": "^0.2.2",
|
|
49
50
|
"typeorm": "^0.3.22"
|