????
Current Path : C:/inetpub/vhost/binhdinhinvest.gdtvietnam.com/api/dist/admin/entity/ |
Current File : C:/inetpub/vhost/binhdinhinvest.gdtvietnam.com/api/dist/admin/entity/chuc-nang.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.QuyenDTO = exports.ChucNang = void 0; const openapi = require("@nestjs/swagger"); const typeorm_1 = require("typeorm"); const nhom_chuc_nang_entity_1 = require("./nhom-chuc-nang.entity"); const tai_khoan_quyen_entity_1 = require("./tai-khoan-quyen.entity"); const vai_tro_quyen_entity_1 = require("./vai-tro-quyen.entity"); const swagger_1 = require("@nestjs/swagger"); let ChucNang = class ChucNang { static _OPENAPI_METADATA_FACTORY() { return { maChucNang: { required: true, type: () => String, nullable: true }, tenChucNang: { required: true, type: () => String, nullable: true }, nhomChucNangId: { required: true, type: () => String, nullable: true }, moTa: { required: true, type: () => String, nullable: true }, url: { required: true, type: () => String, nullable: true }, params: { required: true, type: () => String, nullable: true }, icon: { required: true, type: () => String, nullable: true }, stt: { required: true, type: () => Number, nullable: true }, isHidden: { required: true, type: () => Boolean, nullable: true } }; } }; __decorate([ (0, swagger_1.ApiHideProperty)(), (0, typeorm_1.PrimaryGeneratedColumn)("uuid", { name: "ID" }), __metadata("design:type", String) ], ChucNang.prototype, "id", void 0); __decorate([ (0, swagger_1.ApiHideProperty)(), (0, typeorm_1.CreateDateColumn)({ name: "NgayTao", nullable: true, type: "datetime2" }), __metadata("design:type", Date) ], ChucNang.prototype, "ngayTao", void 0); __decorate([ (0, swagger_1.ApiHideProperty)(), (0, typeorm_1.UpdateDateColumn)({ name: "NgaySua", nullable: true, type: "datetime2" }), __metadata("design:type", Date) ], ChucNang.prototype, "ngaySua", void 0); __decorate([ (0, typeorm_1.Column)("varchar", { name: "MaChucNang", nullable: false, length: 50 }), __metadata("design:type", String) ], ChucNang.prototype, "maChucNang", void 0); __decorate([ (0, typeorm_1.Column)("nvarchar", { name: "TenChucNang", nullable: false, length: 255 }), __metadata("design:type", String) ], ChucNang.prototype, "tenChucNang", void 0); __decorate([ (0, typeorm_1.Column)("uniqueidentifier", { name: "ID_NhomChucNang", nullable: true }), __metadata("design:type", String) ], ChucNang.prototype, "nhomChucNangId", void 0); __decorate([ (0, typeorm_1.Column)("nvarchar", { name: "MoTa", nullable: true, length: 500 }), __metadata("design:type", String) ], ChucNang.prototype, "moTa", void 0); __decorate([ (0, typeorm_1.Column)("varchar", { name: "Url", nullable: true, length: 50 }), __metadata("design:type", String) ], ChucNang.prototype, "url", void 0); __decorate([ (0, typeorm_1.Column)('varchar', { name: 'params', length: 100, nullable: true }), __metadata("design:type", String) ], ChucNang.prototype, "params", void 0); __decorate([ (0, typeorm_1.Column)("varchar", { name: "Icon", nullable: true, length: 50 }), __metadata("design:type", String) ], ChucNang.prototype, "icon", void 0); __decorate([ (0, typeorm_1.Column)("int", { name: "STT", nullable: true }), __metadata("design:type", Number) ], ChucNang.prototype, "stt", void 0); __decorate([ (0, typeorm_1.Column)("bit", { name: "IsHidden", nullable: true, default: false }), __metadata("design:type", Boolean) ], ChucNang.prototype, "isHidden", void 0); __decorate([ (0, swagger_1.ApiHideProperty)(), (0, typeorm_1.ManyToOne)(() => nhom_chuc_nang_entity_1.NhomChucNang, nhomChucNang => nhomChucNang.chucNangs, { onDelete: "CASCADE" }), (0, typeorm_1.JoinColumn)([{ name: "ID_NhomChucNang", referencedColumnName: "id" }]), __metadata("design:type", nhom_chuc_nang_entity_1.NhomChucNang) ], ChucNang.prototype, "nhomChucNang", 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.chucNang), __metadata("design:type", Array) ], ChucNang.prototype, "taiKhoanQuyens", void 0); __decorate([ (0, swagger_1.ApiHideProperty)(), (0, typeorm_1.OneToMany)(() => vai_tro_quyen_entity_1.VaiTroQuyen, vaiTroQuyen => vaiTroQuyen === null || vaiTroQuyen === void 0 ? void 0 : vaiTroQuyen.chucNang), __metadata("design:type", Array) ], ChucNang.prototype, "vaiTroQuyens", void 0); ChucNang = __decorate([ (0, typeorm_1.Index)("PK_SYS_Capability", ["id"], { unique: true }), (0, typeorm_1.Entity)("SYS_ChucNang", { schema: "dbo" }) ], ChucNang); exports.ChucNang = ChucNang; class QuyenDTO { static _OPENAPI_METADATA_FACTORY() { return { chucNang: { required: true, type: () => require("./chuc-nang.entity").ChucNang }, truyCap: { required: true, type: () => Boolean }, them: { required: true, type: () => Boolean }, xoa: { required: true, type: () => Boolean }, sua: { required: true, type: () => Boolean }, download: { required: true, type: () => Boolean }, upload: { required: true, type: () => Boolean }, duyet: { required: true, type: () => Boolean } }; } } __decorate([ (0, swagger_1.ApiProperty)({ type: 'string' }), __metadata("design:type", ChucNang) ], QuyenDTO.prototype, "chucNang", void 0); __decorate([ (0, swagger_1.ApiProperty)(), __metadata("design:type", Boolean) ], QuyenDTO.prototype, "truyCap", void 0); __decorate([ (0, swagger_1.ApiProperty)(), __metadata("design:type", Boolean) ], QuyenDTO.prototype, "them", void 0); __decorate([ (0, swagger_1.ApiProperty)(), __metadata("design:type", Boolean) ], QuyenDTO.prototype, "xoa", void 0); __decorate([ (0, swagger_1.ApiProperty)(), __metadata("design:type", Boolean) ], QuyenDTO.prototype, "sua", void 0); __decorate([ (0, swagger_1.ApiProperty)(), __metadata("design:type", Boolean) ], QuyenDTO.prototype, "download", void 0); __decorate([ (0, swagger_1.ApiProperty)(), __metadata("design:type", Boolean) ], QuyenDTO.prototype, "upload", void 0); __decorate([ (0, swagger_1.ApiProperty)(), __metadata("design:type", Boolean) ], QuyenDTO.prototype, "duyet", void 0); exports.QuyenDTO = QuyenDTO;