????
Current Path : C:/inetpub/vhost/binhdinhinvest.gdtvietnam.com/api/dist/admin/entity/ |
Current File : C:/inetpub/vhost/binhdinhinvest.gdtvietnam.com/api/dist/admin/entity/tai-khoan.entity.js |
"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.TaiKhoan = void 0; const openapi = require("@nestjs/swagger"); const typeorm_1 = require("typeorm"); const swagger_1 = require("@nestjs/swagger"); const bcryptjs_1 = require("bcryptjs"); const don_vi_entity_1 = require("./don-vi.entity"); const tai_khoan_quyen_entity_1 = require("./tai-khoan-quyen.entity"); const entity_1 = require("../../cms/entity"); let TaiKhoan = class TaiKhoan { comparePasword(raw) { return (0, bcryptjs_1.compare)(raw, this.matKhau); } static _OPENAPI_METADATA_FACTORY() { return { maTaiKhoan: { required: true, type: () => String }, matKhau: { required: true, type: () => String }, tenHienThi: { required: false, type: () => String }, email: { required: false, type: () => String, nullable: true }, loaiTaiKhoan: { required: false, type: () => String, nullable: true }, donViId: { required: true, type: () => String } }; } }; __decorate([ (0, swagger_1.ApiHideProperty)(), (0, typeorm_1.PrimaryGeneratedColumn)("uuid", { name: "TaiKhoan_ID" }), __metadata("design:type", String) ], TaiKhoan.prototype, "taiKhoanId", void 0); __decorate([ (0, swagger_1.ApiHideProperty)(), (0, typeorm_1.CreateDateColumn)({ name: "NgayTao", nullable: true, type: "datetime2" }), __metadata("design:type", Date) ], TaiKhoan.prototype, "ngayTao", void 0); __decorate([ (0, swagger_1.ApiHideProperty)(), (0, typeorm_1.UpdateDateColumn)({ name: "NgaySua", nullable: true, type: "datetime2" }), __metadata("design:type", Date) ], TaiKhoan.prototype, "ngaySua", void 0); __decorate([ (0, typeorm_1.Column)("varchar", { name: "MaTaiKhoan", length: 255, unique: true, nullable: false }), __metadata("design:type", String) ], TaiKhoan.prototype, "maTaiKhoan", void 0); __decorate([ (0, typeorm_1.Column)("nvarchar", { name: "MatKhau", length: 255, nullable: false }), __metadata("design:type", String) ], TaiKhoan.prototype, "matKhau", void 0); __decorate([ (0, typeorm_1.Column)("nvarchar", { name: "TenHienThi", nullable: false, length: 255 }), __metadata("design:type", String) ], TaiKhoan.prototype, "tenHienThi", void 0); __decorate([ (0, swagger_1.ApiHideProperty)(), (0, typeorm_1.Column)("bit", { name: "HoatDong", nullable: true, default: true }), __metadata("design:type", Boolean) ], TaiKhoan.prototype, "hoatDong", void 0); __decorate([ (0, typeorm_1.Column)("varchar", { name: "Email", nullable: true, length: 255 }), __metadata("design:type", String) ], TaiKhoan.prototype, "email", void 0); __decorate([ (0, swagger_1.ApiHideProperty)(), (0, typeorm_1.Column)("int", { name: "DangNhapThatBai", nullable: true }), __metadata("design:type", Number) ], TaiKhoan.prototype, "dangNhapThatBai", void 0); __decorate([ (0, typeorm_1.Column)("varchar", { name: "LoaiTaiKhoan", nullable: true, length: 20 }), __metadata("design:type", String) ], TaiKhoan.prototype, "loaiTaiKhoan", void 0); __decorate([ (0, typeorm_1.Column)("uniqueidentifier", { name: "DonVi_ID", nullable: false }), __metadata("design:type", String) ], TaiKhoan.prototype, "donViId", void 0); __decorate([ (0, swagger_1.ApiHideProperty)(), (0, typeorm_1.ManyToOne)(() => don_vi_entity_1.DonVi, donVi => donVi === null || donVi === void 0 ? void 0 : donVi.taiKhoans), (0, typeorm_1.JoinColumn)([{ name: "DonVi_ID", referencedColumnName: "donViId" }]), __metadata("design:type", don_vi_entity_1.DonVi) ], TaiKhoan.prototype, "donVi", void 0); __decorate([ (0, swagger_1.ApiHideProperty)(), (0, typeorm_1.OneToMany)(() => tai_khoan_quyen_entity_1.TaiKhoanQuyen, taiKhoanQuyen => taiKhoanQuyen === null || taiKhoanQuyen === void 0 ? void 0 : taiKhoanQuyen.taiKhoan, { cascade: true }), __metadata("design:type", Array) ], TaiKhoan.prototype, "taiKhoanQuyens", void 0); __decorate([ (0, swagger_1.ApiHideProperty)(), (0, typeorm_1.OneToMany)(() => entity_1.BaiViet, baiViet => baiViet.nguoiTao), __metadata("design:type", Array) ], TaiKhoan.prototype, "baiViets", void 0); __decorate([ (0, swagger_1.ApiHideProperty)(), (0, typeorm_1.OneToMany)(() => entity_1.ChuyenMuc, chuyenMuc => chuyenMuc.nguoiTao), __metadata("design:type", Array) ], TaiKhoan.prototype, "chuyenMucs", void 0); __decorate([ (0, swagger_1.ApiHideProperty)(), (0, typeorm_1.OneToMany)(() => entity_1.Upload, upload => upload.nguoiTao), __metadata("design:type", Array) ], TaiKhoan.prototype, "uploads", void 0); TaiKhoan = __decorate([ (0, typeorm_1.Index)("PK_SYS_TaiKhoan", ["taiKhoanId"], { unique: true }), (0, typeorm_1.Entity)("SYS_TaiKhoan", { schema: "dbo" }) ], TaiKhoan); exports.TaiKhoan = TaiKhoan;