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,14 @@
import { Message } from '../../messages/entities/message.entity';
export declare class User {
id: string;
username: string;
email: string;
password: string;
avatar?: string;
bio?: string;
isOnline: boolean;
lastSeen?: Date;
messages: Message[];
createdAt: Date;
updatedAt: Date;
}

View File

@ -0,0 +1,89 @@
"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.User = void 0;
const graphql_1 = require("@nestjs/graphql");
const typeorm_1 = require("typeorm");
const message_entity_1 = require("../../messages/entities/message.entity");
let User = class User {
id;
username;
email;
password;
avatar;
bio;
isOnline;
lastSeen;
messages;
createdAt;
updatedAt;
};
exports.User = User;
__decorate([
(0, graphql_1.Field)(() => graphql_1.ID),
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
__metadata("design:type", String)
], User.prototype, "id", void 0);
__decorate([
(0, graphql_1.Field)(),
(0, typeorm_1.Column)({ unique: true }),
__metadata("design:type", String)
], User.prototype, "username", void 0);
__decorate([
(0, graphql_1.Field)(),
(0, typeorm_1.Column)({ unique: true }),
__metadata("design:type", String)
], User.prototype, "email", void 0);
__decorate([
(0, graphql_1.HideField)(),
(0, typeorm_1.Column)(),
__metadata("design:type", String)
], User.prototype, "password", void 0);
__decorate([
(0, graphql_1.Field)(() => String, { nullable: true }),
(0, typeorm_1.Column)({ nullable: true }),
__metadata("design:type", String)
], User.prototype, "avatar", void 0);
__decorate([
(0, graphql_1.Field)(() => String, { nullable: true }),
(0, typeorm_1.Column)({ nullable: true }),
__metadata("design:type", String)
], User.prototype, "bio", void 0);
__decorate([
(0, graphql_1.Field)(() => Boolean),
(0, typeorm_1.Column)({ default: false }),
__metadata("design:type", Boolean)
], User.prototype, "isOnline", void 0);
__decorate([
(0, graphql_1.Field)(() => Date, { nullable: true }),
(0, typeorm_1.Column)({ nullable: true }),
__metadata("design:type", Date)
], User.prototype, "lastSeen", void 0);
__decorate([
(0, graphql_1.Field)(() => [message_entity_1.Message]),
(0, typeorm_1.OneToMany)(() => message_entity_1.Message, message => message.sender),
__metadata("design:type", Array)
], User.prototype, "messages", void 0);
__decorate([
(0, graphql_1.Field)(() => Date),
(0, typeorm_1.CreateDateColumn)(),
__metadata("design:type", Date)
], User.prototype, "createdAt", void 0);
__decorate([
(0, graphql_1.Field)(() => Date),
(0, typeorm_1.UpdateDateColumn)(),
__metadata("design:type", Date)
], User.prototype, "updatedAt", void 0);
exports.User = User = __decorate([
(0, graphql_1.ObjectType)(),
(0, typeorm_1.Entity)('users')
], User);
//# sourceMappingURL=user.entity.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"user.entity.js","sourceRoot":"","sources":["../../../../src/modules/users/entities/user.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmE;AACnE,qCAAgH;AAChH,2EAAiE;AAI1D,IAAM,IAAI,GAAV,MAAM,IAAI;IAGf,EAAE,CAAS;IAIX,QAAQ,CAAS;IAIjB,KAAK,CAAS;IAId,QAAQ,CAAS;IAIjB,MAAM,CAAU;IAIhB,GAAG,CAAU;IAIb,QAAQ,CAAU;IAIlB,QAAQ,CAAQ;IAIhB,QAAQ,CAAY;IAIpB,SAAS,CAAO;IAIhB,SAAS,CAAO;CACjB,CAAA;AA5CY,oBAAI;AAGf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