Configure remote database connection and update documentation
This commit is contained in:
12
backend/dist/modules/conversations/entities/conversation.entity.d.ts
vendored
Normal file
12
backend/dist/modules/conversations/entities/conversation.entity.d.ts
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
import { User } from '../../users/entities/user.entity';
|
||||
import { Message } from '../../messages/entities/message.entity';
|
||||
export declare class Conversation {
|
||||
id: string;
|
||||
name?: string;
|
||||
isGroup: boolean;
|
||||
participants: User[];
|
||||
messages: Message[];
|
||||
lastMessage?: Message;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}
|
76
backend/dist/modules/conversations/entities/conversation.entity.js
vendored
Normal file
76
backend/dist/modules/conversations/entities/conversation.entity.js
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Conversation = void 0;
|
||||
const graphql_1 = require("@nestjs/graphql");
|
||||
const typeorm_1 = require("typeorm");
|
||||
const user_entity_1 = require("../../users/entities/user.entity");
|
||||
const message_entity_1 = require("../../messages/entities/message.entity");
|
||||
let Conversation = class Conversation {
|
||||
id;
|
||||
name;
|
||||
isGroup;
|
||||
participants;
|
||||
messages;
|
||||
lastMessage;
|
||||
createdAt;
|
||||
updatedAt;
|
||||
};
|
||||
exports.Conversation = Conversation;
|
||||
__decorate([
|
||||
(0, graphql_1.Field)(() => graphql_1.ID),
|
||||
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
||||
__metadata("design:type", String)
|
||||
], Conversation.prototype, "id", void 0);
|
||||
__decorate([
|
||||
(0, graphql_1.Field)(() => String, { nullable: true }),
|
||||
(0, typeorm_1.Column)({ nullable: true }),
|
||||
__metadata("design:type", String)
|
||||
], Conversation.prototype, "name", void 0);
|
||||
__decorate([
|
||||
(0, graphql_1.Field)(() => Boolean),
|
||||
(0, typeorm_1.Column)({ default: false }),
|
||||
__metadata("design:type", Boolean)
|
||||
], Conversation.prototype, "isGroup", void 0);
|
||||
__decorate([
|
||||
(0, graphql_1.Field)(() => [user_entity_1.User]),
|
||||
(0, typeorm_1.ManyToMany)(() => user_entity_1.User),
|
||||
(0, typeorm_1.JoinTable)({
|
||||
name: 'conversation_participants',
|
||||
joinColumn: { name: 'conversationId', referencedColumnName: 'id' },
|
||||
inverseJoinColumn: { name: 'userId', referencedColumnName: 'id' },
|
||||
}),
|
||||
__metadata("design:type", Array)
|
||||
], Conversation.prototype, "participants", void 0);
|
||||
__decorate([
|
||||
(0, graphql_1.Field)(() => [message_entity_1.Message]),
|
||||
(0, typeorm_1.OneToMany)(() => message_entity_1.Message, message => message.conversation),
|
||||
__metadata("design:type", Array)
|
||||
], Conversation.prototype, "messages", void 0);
|
||||
__decorate([
|
||||
(0, graphql_1.Field)(() => message_entity_1.Message, { nullable: true }),
|
||||
__metadata("design:type", message_entity_1.Message)
|
||||
], Conversation.prototype, "lastMessage", void 0);
|
||||
__decorate([
|
||||
(0, graphql_1.Field)(() => Date),
|
||||
(0, typeorm_1.CreateDateColumn)(),
|
||||
__metadata("design:type", Date)
|
||||
], Conversation.prototype, "createdAt", void 0);
|
||||
__decorate([
|
||||
(0, graphql_1.Field)(() => Date),
|
||||
(0, typeorm_1.UpdateDateColumn)(),
|
||||
__metadata("design:type", Date)
|
||||
], Conversation.prototype, "updatedAt", void 0);
|
||||
exports.Conversation = Conversation = __decorate([
|
||||
(0, graphql_1.ObjectType)(),
|
||||
(0, typeorm_1.Entity)('conversations')
|
||||
], Conversation);
|
||||
//# sourceMappingURL=conversation.entity.js.map
|
1
backend/dist/modules/conversations/entities/conversation.entity.js.map
vendored
Normal file
1
backend/dist/modules/conversations/entities/conversation.entity.js.map
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"conversation.entity.js","sourceRoot":"","sources":["../../../../src/modules/conversations/entities/conversation.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAwD;AACxD,qCAAuI;AACvI,kEAAwD;AACxD,2EAAiE;AAI1D,IAAM,YAAY,GAAlB,MAAM,YAAY;IAGvB,EAAE,CAAS;IAIX,IAAI,CAAU;IAId,OAAO,CAAU;IASjB,YAAY,CAAS;IAIrB,QAAQ,CAAY;IAGpB,WAAW,CAAW;IAItB,SAAS,CAAO;IAIhB,SAAS,CAAO;CACjB,CAAA;AApCY,oCAAY;AAGvB;IAFC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,CAAC;IACf,IAAA,gCAAsB,EAAC,MAAM,CAAC;;wCACpB;AAIX;IAFC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACvC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACb;AAId;IAFC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,OAAO,CAAC;IACpB,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;6CACV;AASjB;IAPC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,CAAC,kBAAI,CAAC,CAAC;IACnB,IAAA,oBAAU,EAAC,GAAG,EAAE,CAAC,kBAAI,CAAC;IACtB,IAAA,mBAAS,EAAC;QACT,IAAI,EAAE,2BAA2B;QACjC,UAAU,EAAE,EAAE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