Configure remote database connection and update documentation

This commit is contained in:
Bivekich
2025-08-06 02:24:01 +03:00
parent 5bd7d79642
commit e1b79f017a
67 changed files with 1513 additions and 15 deletions

View File

@ -0,0 +1,13 @@
import { User } from '../../users/entities/user.entity';
import { Conversation } from '../../conversations/entities/conversation.entity';
export declare class Message {
id: string;
content: string;
sender: User;
conversation: Conversation;
isRead: boolean;
isEdited: boolean;
editedAt?: Date;
createdAt: Date;
updatedAt: Date;
}

View File

@ -0,0 +1,78 @@
"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.Message = void 0;
const graphql_1 = require("@nestjs/graphql");
const typeorm_1 = require("typeorm");
const user_entity_1 = require("../../users/entities/user.entity");
const conversation_entity_1 = require("../../conversations/entities/conversation.entity");
let Message = class Message {
id;
content;
sender;
conversation;
isRead;
isEdited;
editedAt;
createdAt;
updatedAt;
};
exports.Message = Message;
__decorate([
(0, graphql_1.Field)(() => graphql_1.ID),
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
__metadata("design:type", String)
], Message.prototype, "id", void 0);
__decorate([
(0, graphql_1.Field)(),
(0, typeorm_1.Column)('text'),
__metadata("design:type", String)
], Message.prototype, "content", void 0);
__decorate([
(0, graphql_1.Field)(() => user_entity_1.User),
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, user => user.messages),
__metadata("design:type", user_entity_1.User)
], Message.prototype, "sender", void 0);
__decorate([
(0, graphql_1.Field)(() => conversation_entity_1.Conversation),
(0, typeorm_1.ManyToOne)(() => conversation_entity_1.Conversation, conversation => conversation.messages),
__metadata("design:type", conversation_entity_1.Conversation)
], Message.prototype, "conversation", void 0);
__decorate([
(0, graphql_1.Field)(() => Boolean),
(0, typeorm_1.Column)({ default: false }),
__metadata("design:type", Boolean)
], Message.prototype, "isRead", void 0);
__decorate([
(0, graphql_1.Field)(() => Boolean),
(0, typeorm_1.Column)({ default: false }),
__metadata("design:type", Boolean)
], Message.prototype, "isEdited", void 0);
__decorate([
(0, graphql_1.Field)(() => Date, { nullable: true }),
(0, typeorm_1.Column)({ nullable: true }),
__metadata("design:type", Date)
], Message.prototype, "editedAt", void 0);
__decorate([
(0, graphql_1.Field)(() => Date),
(0, typeorm_1.CreateDateColumn)(),
__metadata("design:type", Date)
], Message.prototype, "createdAt", void 0);
__decorate([
(0, graphql_1.Field)(() => Date),
(0, typeorm_1.UpdateDateColumn)(),
__metadata("design:type", Date)
], Message.prototype, "updatedAt", void 0);
exports.Message = Message = __decorate([
(0, graphql_1.ObjectType)(),
(0, typeorm_1.Entity)('messages')
], Message);
//# sourceMappingURL=message.entity.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"message.entity.js","sourceRoot":"","sources":["../../../../src/modules/messages/entities/message.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAwD;AACxD,qCAAgH;AAChH,kEAAwD;AACxD,0FAAgF;AAIzE,IAAM,OAAO,GAAb,MAAM,OAAO;IAGlB,EAAE,CAAS;IAIX,OAAO,CAAS;IAIhB,MAAM,CAAO;IAIb,YAAY,CAAe;IAI3B,MAAM,CAAU;IAIhB,QAAQ,CAAU;IAIlB,QAAQ,CAAQ;IAIhB,SAAS,CAAO;IAIhB,SAAS,CAAO;CACjB,CAAA;AApCY,0BAAO;AAGlB;IAFC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,CAAC;IACf,IAAA,gCAAsB,E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