erp-construccion-backend/dist/modules/infonavit/entities/acta.entity.js

149 lines
5.8 KiB
JavaScript

"use strict";
/**
* Acta Entity
* Actas oficiales INFONAVIT (entregas, inspecciones, etc.)
*
* @module Infonavit
* @table infonavit.actas
*/
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.Acta = void 0;
const typeorm_1 = require("typeorm");
const tenant_entity_1 = require("../../core/entities/tenant.entity");
const user_entity_1 = require("../../core/entities/user.entity");
const acta_vivienda_entity_1 = require("./acta-vivienda.entity");
let Acta = class Acta {
id;
tenantId;
registroId;
actaNumber;
actaType;
scheduledDate;
executionDate;
location;
infonavitRepresentative;
developerRepresentative;
totalUnits;
status;
observations;
notes;
createdAt;
createdById;
updatedAt;
updatedById;
deletedAt;
deletedById;
// Relations
tenant;
createdBy;
viviendas;
};
exports.Acta = Acta;
__decorate([
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
__metadata("design:type", String)
], Acta.prototype, "id", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'tenant_id', type: 'uuid' }),
__metadata("design:type", String)
], Acta.prototype, "tenantId", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'registro_id', type: 'uuid' }),
__metadata("design:type", String)
], Acta.prototype, "registroId", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'acta_number', type: 'varchar', length: 50 }),
__metadata("design:type", String)
], Acta.prototype, "actaNumber", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'acta_type', type: 'varchar', length: 20 }),
__metadata("design:type", String)
], Acta.prototype, "actaType", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'scheduled_date', type: 'date' }),
__metadata("design:type", Date)
], Acta.prototype, "scheduledDate", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'execution_date', type: 'date', nullable: true }),
__metadata("design:type", Date)
], Acta.prototype, "executionDate", void 0);
__decorate([
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
__metadata("design:type", String)
], Acta.prototype, "location", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'infonavit_representative', type: 'varchar', length: 200, nullable: true }),
__metadata("design:type", String)
], Acta.prototype, "infonavitRepresentative", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'developer_representative', type: 'varchar', length: 200, nullable: true }),
__metadata("design:type", String)
], Acta.prototype, "developerRepresentative", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'total_units', type: 'integer', default: 0 }),
__metadata("design:type", Number)
], Acta.prototype, "totalUnits", void 0);
__decorate([
(0, typeorm_1.Column)({ type: 'varchar', length: 20, default: 'draft' }),
__metadata("design:type", String)
], Acta.prototype, "status", void 0);
__decorate([
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
__metadata("design:type", String)
], Acta.prototype, "observations", void 0);
__decorate([
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
__metadata("design:type", String)
], Acta.prototype, "notes", void 0);
__decorate([
(0, typeorm_1.CreateDateColumn)({ name: 'created_at', type: 'timestamptz' }),
__metadata("design:type", Date)
], Acta.prototype, "createdAt", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'created_by', type: 'uuid', nullable: true }),
__metadata("design:type", String)
], Acta.prototype, "createdById", void 0);
__decorate([
(0, typeorm_1.UpdateDateColumn)({ name: 'updated_at', type: 'timestamptz' }),
__metadata("design:type", Date)
], Acta.prototype, "updatedAt", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'updated_by', type: 'uuid', nullable: true }),
__metadata("design:type", String)
], Acta.prototype, "updatedById", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'deleted_at', type: 'timestamptz', nullable: true }),
__metadata("design:type", Date)
], Acta.prototype, "deletedAt", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'deleted_by', type: 'uuid', nullable: true }),
__metadata("design:type", String)
], Acta.prototype, "deletedById", void 0);
__decorate([
(0, typeorm_1.ManyToOne)(() => tenant_entity_1.Tenant),
(0, typeorm_1.JoinColumn)({ name: 'tenant_id' }),
__metadata("design:type", tenant_entity_1.Tenant)
], Acta.prototype, "tenant", void 0);
__decorate([
(0, typeorm_1.ManyToOne)(() => user_entity_1.User),
(0, typeorm_1.JoinColumn)({ name: 'created_by' }),
__metadata("design:type", user_entity_1.User)
], Acta.prototype, "createdBy", void 0);
__decorate([
(0, typeorm_1.OneToMany)(() => acta_vivienda_entity_1.ActaVivienda, (av) => av.acta),
__metadata("design:type", Array)
], Acta.prototype, "viviendas", void 0);
exports.Acta = Acta = __decorate([
(0, typeorm_1.Entity)({ schema: 'infonavit', name: 'actas' }),
(0, typeorm_1.Index)(['tenantId', 'actaNumber'], { unique: true })
], Acta);
//# sourceMappingURL=acta.entity.js.map