echadospalante-core 14.3.0 → 14.4.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.
@@ -7,10 +7,11 @@ export interface VenturePublication {
7
7
  description: string;
8
8
  active: boolean;
9
9
  venture?: Venture;
10
+ clapsCount: number;
10
11
  type: PublicationType;
11
12
  claps: PublicationClap[];
12
13
  comments: PublicationComment[];
13
- body: PublicationContent[];
14
+ contents: PublicationContent[];
14
15
  createdAt: Date;
15
16
  }
16
17
  export declare enum PublicationType {
@@ -25,3 +26,8 @@ export interface PublicationContent {
25
26
  type: ContentType;
26
27
  content: string;
27
28
  }
29
+ export interface PublicationCreate {
30
+ description: string;
31
+ type: PublicationType;
32
+ contents: PublicationContent[];
33
+ }
@@ -6,12 +6,12 @@ import { VentureData } from "./venture.data";
6
6
  export declare class VenturePublicationData {
7
7
  id: string;
8
8
  description: string;
9
- type: PublicationType;
9
+ active: boolean;
10
+ venture?: VentureData;
10
11
  clapsCount: number;
11
- createdAt: Date;
12
- updatedAt: Date;
13
- venture: VentureData;
12
+ type: PublicationType;
14
13
  claps: PublicationClapData[];
15
14
  comments: PublicationCommentData[];
16
15
  contents: PublicationContentData[];
16
+ createdAt: Date;
17
17
  }
@@ -19,14 +19,14 @@ const venture_data_1 = require("./venture.data");
19
19
  let VenturePublicationData = class VenturePublicationData {
20
20
  id;
21
21
  description;
22
- type;
23
- clapsCount;
24
- createdAt;
25
- updatedAt;
22
+ active;
26
23
  venture;
24
+ clapsCount;
25
+ type;
27
26
  claps;
28
27
  comments;
29
28
  contents;
29
+ createdAt;
30
30
  };
31
31
  exports.VenturePublicationData = VenturePublicationData;
32
32
  __decorate([
@@ -38,26 +38,22 @@ __decorate([
38
38
  __metadata("design:type", String)
39
39
  ], VenturePublicationData.prototype, "description", void 0);
40
40
  __decorate([
41
- (0, typeorm_1.Column)({ type: "enum", enum: publications_1.PublicationType }),
42
- __metadata("design:type", String)
43
- ], VenturePublicationData.prototype, "type", void 0);
44
- __decorate([
45
- (0, typeorm_1.Column)(),
46
- __metadata("design:type", Number)
47
- ], VenturePublicationData.prototype, "clapsCount", void 0);
48
- __decorate([
49
- (0, typeorm_1.CreateDateColumn)(),
50
- __metadata("design:type", Date)
51
- ], VenturePublicationData.prototype, "createdAt", void 0);
52
- __decorate([
53
- (0, typeorm_1.UpdateDateColumn)(),
54
- __metadata("design:type", Date)
55
- ], VenturePublicationData.prototype, "updatedAt", void 0);
41
+ (0, typeorm_1.Column)({ default: true }),
42
+ __metadata("design:type", Boolean)
43
+ ], VenturePublicationData.prototype, "active", void 0);
56
44
  __decorate([
57
45
  (0, typeorm_1.ManyToOne)(() => venture_data_1.VentureData, (venture) => venture.publications),
58
46
  (0, typeorm_1.JoinColumn)({ name: "ventureId" }),
59
47
  __metadata("design:type", venture_data_1.VentureData)
60
48
  ], VenturePublicationData.prototype, "venture", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)(),
51
+ __metadata("design:type", Number)
52
+ ], VenturePublicationData.prototype, "clapsCount", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)({ type: "enum", enum: publications_1.PublicationType }),
55
+ __metadata("design:type", String)
56
+ ], VenturePublicationData.prototype, "type", void 0);
61
57
  __decorate([
62
58
  (0, typeorm_1.OneToMany)(() => publication_clap_data_1.PublicationClapData, (publicationClap) => publicationClap.publication),
63
59
  __metadata("design:type", Array)
@@ -70,6 +66,10 @@ __decorate([
70
66
  (0, typeorm_1.OneToMany)(() => publication_content_data_1.PublicationContentData, (publicationContent) => publicationContent.publication),
71
67
  __metadata("design:type", Array)
72
68
  ], VenturePublicationData.prototype, "contents", void 0);
69
+ __decorate([
70
+ (0, typeorm_1.CreateDateColumn)(),
71
+ __metadata("design:type", Date)
72
+ ], VenturePublicationData.prototype, "createdAt", void 0);
73
73
  exports.VenturePublicationData = VenturePublicationData = __decorate([
74
74
  (0, typeorm_1.Entity)({ name: "venture_publication" })
75
75
  ], VenturePublicationData);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "echadospalante-core",
3
- "version": "14.3.0",
3
+ "version": "14.4.0",
4
4
  "description": "This package contains the core of the echadospalante project, it contains the domain entities, helpers, and other utilities that are shared between the different services.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -8,10 +8,11 @@ export interface VenturePublication {
8
8
  description: string;
9
9
  active: boolean;
10
10
  venture?: Venture;
11
+ clapsCount: number;
11
12
  type: PublicationType;
12
13
  claps: PublicationClap[];
13
14
  comments: PublicationComment[];
14
- body: PublicationContent[];
15
+ contents: PublicationContent[];
15
16
  createdAt: Date;
16
17
  }
17
18
 
@@ -28,3 +29,9 @@ export interface PublicationContent {
28
29
  type: ContentType;
29
30
  content: string; // JSON string
30
31
  }
32
+
33
+ export interface PublicationCreate {
34
+ description: string;
35
+ type: PublicationType;
36
+ contents: PublicationContent[];
37
+ }
@@ -23,21 +23,18 @@ export class VenturePublicationData {
23
23
  @Column()
24
24
  description: string;
25
25
 
26
- @Column({ type: "enum", enum: PublicationType })
27
- type: PublicationType;
26
+ @Column({ default: true })
27
+ active: boolean;
28
+
29
+ @ManyToOne(() => VentureData, (venture) => venture.publications)
30
+ @JoinColumn({ name: "ventureId" })
31
+ venture?: VentureData;
28
32
 
29
33
  @Column()
30
34
  clapsCount: number;
31
35
 
32
- @CreateDateColumn()
33
- createdAt: Date;
34
-
35
- @UpdateDateColumn()
36
- updatedAt: Date;
37
-
38
- @ManyToOne(() => VentureData, (venture) => venture.publications)
39
- @JoinColumn({ name: "ventureId" })
40
- venture: VentureData;
36
+ @Column({ type: "enum", enum: PublicationType })
37
+ type: PublicationType;
41
38
 
42
39
  @OneToMany(
43
40
  () => PublicationClapData,
@@ -56,4 +53,7 @@ export class VenturePublicationData {
56
53
  (publicationContent) => publicationContent.publication
57
54
  )
58
55
  contents: PublicationContentData[];
56
+
57
+ @CreateDateColumn()
58
+ createdAt: Date;
59
59
  }