"use strict"; /** * Capacitacion Entity * Catálogo de capacitaciones HSE * * @module HSE * @table hse.capacitaciones * @ddl schemas/03-hse-schema-ddl.sql * @rf RF-MAA017-002 */ 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.Capacitacion = void 0; const typeorm_1 = require("typeorm"); const tenant_entity_1 = require("../../core/entities/tenant.entity"); let Capacitacion = class Capacitacion { id; tenantId; codigo; nombre; descripcion; tipo; duracionHoras; vigenciaMeses; requiereEvaluacion; calificacionMinima; activo; createdAt; updatedAt; // Relations tenant; }; exports.Capacitacion = Capacitacion; __decorate([ (0, typeorm_1.PrimaryGeneratedColumn)('uuid'), __metadata("design:type", String) ], Capacitacion.prototype, "id", void 0); __decorate([ (0, typeorm_1.Column)({ name: 'tenant_id', type: 'uuid' }), __metadata("design:type", String) ], Capacitacion.prototype, "tenantId", void 0); __decorate([ (0, typeorm_1.Column)({ type: 'varchar', length: 20 }), __metadata("design:type", String) ], Capacitacion.prototype, "codigo", void 0); __decorate([ (0, typeorm_1.Column)({ type: 'varchar', length: 200 }), __metadata("design:type", String) ], Capacitacion.prototype, "nombre", void 0); __decorate([ (0, typeorm_1.Column)({ type: 'text', nullable: true }), __metadata("design:type", String) ], Capacitacion.prototype, "descripcion", void 0); __decorate([ (0, typeorm_1.Column)({ type: 'enum', enum: ['induccion', 'especifica', 'certificacion', 'reentrenamiento'] }), __metadata("design:type", String) ], Capacitacion.prototype, "tipo", void 0); __decorate([ (0, typeorm_1.Column)({ name: 'duracion_horas', type: 'integer', default: 1 }), __metadata("design:type", Number) ], Capacitacion.prototype, "duracionHoras", void 0); __decorate([ (0, typeorm_1.Column)({ name: 'vigencia_meses', type: 'integer', nullable: true }), __metadata("design:type", Number) ], Capacitacion.prototype, "vigenciaMeses", void 0); __decorate([ (0, typeorm_1.Column)({ name: 'requiere_evaluacion', type: 'boolean', default: false }), __metadata("design:type", Boolean) ], Capacitacion.prototype, "requiereEvaluacion", void 0); __decorate([ (0, typeorm_1.Column)({ name: 'calificacion_minima', type: 'integer', nullable: true }), __metadata("design:type", Number) ], Capacitacion.prototype, "calificacionMinima", void 0); __decorate([ (0, typeorm_1.Column)({ type: 'boolean', default: true }), __metadata("design:type", Boolean) ], Capacitacion.prototype, "activo", void 0); __decorate([ (0, typeorm_1.CreateDateColumn)({ name: 'created_at', type: 'timestamptz' }), __metadata("design:type", Date) ], Capacitacion.prototype, "createdAt", void 0); __decorate([ (0, typeorm_1.UpdateDateColumn)({ name: 'updated_at', type: 'timestamptz' }), __metadata("design:type", Date) ], Capacitacion.prototype, "updatedAt", 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) ], Capacitacion.prototype, "tenant", void 0); exports.Capacitacion = Capacitacion = __decorate([ (0, typeorm_1.Entity)({ schema: 'hse', name: 'capacitaciones' }), (0, typeorm_1.Index)(['tenantId', 'codigo'], { unique: true }) ], Capacitacion); //# sourceMappingURL=capacitacion.entity.js.map