@platform-modules/foreign-ministry 1.0.44 → 1.0.46
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.
|
@@ -6,9 +6,10 @@ export declare class ConversationParticipant extends BaseModel {
|
|
|
6
6
|
userId: number;
|
|
7
7
|
roleId: number;
|
|
8
8
|
joinedAt: Date;
|
|
9
|
+
lastReadAt?: Date;
|
|
9
10
|
createdAt: Date;
|
|
10
11
|
updatedAt?: Date;
|
|
11
12
|
conversation?: Conversation;
|
|
12
13
|
user?: User;
|
|
13
|
-
constructor(conversationId?: number, userId?: number, roleId?: number, joinedAt?: Date, createdAt?: Date, updatedAt?: Date);
|
|
14
|
+
constructor(conversationId?: number, userId?: number, roleId?: number, joinedAt?: Date, lastReadAt?: Date, createdAt?: Date, updatedAt?: Date);
|
|
14
15
|
}
|
|
@@ -15,12 +15,13 @@ const BaseModel_1 = require("./BaseModel");
|
|
|
15
15
|
const ConversationModel_1 = require("./ConversationModel");
|
|
16
16
|
const user_1 = require("./user");
|
|
17
17
|
let ConversationParticipant = class ConversationParticipant extends BaseModel_1.BaseModel {
|
|
18
|
-
constructor(conversationId, userId, roleId, joinedAt, createdAt, updatedAt) {
|
|
18
|
+
constructor(conversationId, userId, roleId, joinedAt, lastReadAt, createdAt, updatedAt) {
|
|
19
19
|
super();
|
|
20
20
|
this.conversationId = conversationId || 0;
|
|
21
21
|
this.userId = userId || 0;
|
|
22
22
|
this.roleId = roleId || 0;
|
|
23
23
|
this.joinedAt = joinedAt || new Date();
|
|
24
|
+
this.lastReadAt = lastReadAt;
|
|
24
25
|
this.createdAt = createdAt || new Date();
|
|
25
26
|
this.updatedAt = updatedAt;
|
|
26
27
|
}
|
|
@@ -42,6 +43,10 @@ __decorate([
|
|
|
42
43
|
(0, typeorm_1.Column)({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' }),
|
|
43
44
|
__metadata("design:type", Date)
|
|
44
45
|
], ConversationParticipant.prototype, "joinedAt", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ type: 'timestamp', nullable: true }),
|
|
48
|
+
__metadata("design:type", Date)
|
|
49
|
+
], ConversationParticipant.prototype, "lastReadAt", void 0);
|
|
45
50
|
__decorate([
|
|
46
51
|
(0, typeorm_1.Column)({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' }),
|
|
47
52
|
__metadata("design:type", Date)
|
|
@@ -63,6 +68,7 @@ __decorate([
|
|
|
63
68
|
exports.ConversationParticipant = ConversationParticipant = __decorate([
|
|
64
69
|
(0, typeorm_1.Entity)({ name: 'conversation_participants' }),
|
|
65
70
|
__metadata("design:paramtypes", [Number, Number, Number, Date,
|
|
71
|
+
Date,
|
|
66
72
|
Date,
|
|
67
73
|
Date])
|
|
68
74
|
], ConversationParticipant);
|
package/package.json
CHANGED
|
@@ -18,6 +18,9 @@ export class ConversationParticipant extends BaseModel {
|
|
|
18
18
|
@Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
|
|
19
19
|
joinedAt: Date;
|
|
20
20
|
|
|
21
|
+
@Column({ type: 'timestamp', nullable: true })
|
|
22
|
+
lastReadAt?: Date;
|
|
23
|
+
|
|
21
24
|
@Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
|
|
22
25
|
createdAt: Date;
|
|
23
26
|
|
|
@@ -37,6 +40,7 @@ export class ConversationParticipant extends BaseModel {
|
|
|
37
40
|
userId?: number,
|
|
38
41
|
roleId?: number,
|
|
39
42
|
joinedAt?: Date,
|
|
43
|
+
lastReadAt?: Date,
|
|
40
44
|
createdAt?: Date,
|
|
41
45
|
updatedAt?: Date
|
|
42
46
|
) {
|
|
@@ -45,6 +49,7 @@ export class ConversationParticipant extends BaseModel {
|
|
|
45
49
|
this.userId = userId || 0;
|
|
46
50
|
this.roleId = roleId || 0;
|
|
47
51
|
this.joinedAt = joinedAt || new Date();
|
|
52
|
+
this.lastReadAt = lastReadAt;
|
|
48
53
|
this.createdAt = createdAt || new Date();
|
|
49
54
|
this.updatedAt = updatedAt;
|
|
50
55
|
}
|