128 lines
5.0 KiB
JavaScript
128 lines
5.0 KiB
JavaScript
"use strict";
|
|
/**
|
|
* FotoAvance Entity
|
|
* Evidencia fotografica de avances de obra
|
|
*
|
|
* @module Progress
|
|
* @table construction.fotos_avance
|
|
* @ddl schemas/01-construction-schema-ddl.sql
|
|
*/
|
|
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.FotoAvance = 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 avance_obra_entity_1 = require("./avance-obra.entity");
|
|
let FotoAvance = class FotoAvance {
|
|
id;
|
|
tenantId;
|
|
avanceId;
|
|
fileUrl;
|
|
fileName;
|
|
fileSize;
|
|
mimeType;
|
|
description;
|
|
// PostGIS Point para ubicacion GPS
|
|
location;
|
|
capturedAt;
|
|
createdAt;
|
|
createdById;
|
|
deletedAt;
|
|
deletedById;
|
|
// Relations
|
|
tenant;
|
|
avance;
|
|
createdBy;
|
|
};
|
|
exports.FotoAvance = FotoAvance;
|
|
__decorate([
|
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
__metadata("design:type", String)
|
|
], FotoAvance.prototype, "id", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ name: 'tenant_id', type: 'uuid' }),
|
|
__metadata("design:type", String)
|
|
], FotoAvance.prototype, "tenantId", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ name: 'avance_id', type: 'uuid' }),
|
|
__metadata("design:type", String)
|
|
], FotoAvance.prototype, "avanceId", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ name: 'file_url', type: 'varchar', length: 500 }),
|
|
__metadata("design:type", String)
|
|
], FotoAvance.prototype, "fileUrl", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ name: 'file_name', type: 'varchar', length: 255, nullable: true }),
|
|
__metadata("design:type", Object)
|
|
], FotoAvance.prototype, "fileName", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ name: 'file_size', type: 'integer', nullable: true }),
|
|
__metadata("design:type", Object)
|
|
], FotoAvance.prototype, "fileSize", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ name: 'mime_type', type: 'varchar', length: 50, nullable: true }),
|
|
__metadata("design:type", Object)
|
|
], FotoAvance.prototype, "mimeType", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
__metadata("design:type", Object)
|
|
], FotoAvance.prototype, "description", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({
|
|
type: 'geometry',
|
|
spatialFeatureType: 'Point',
|
|
srid: 4326,
|
|
nullable: true,
|
|
}),
|
|
__metadata("design:type", Object)
|
|
], FotoAvance.prototype, "location", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ name: 'captured_at', type: 'timestamptz', default: () => 'NOW()' }),
|
|
__metadata("design:type", Date)
|
|
], FotoAvance.prototype, "capturedAt", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.CreateDateColumn)({ name: 'created_at', type: 'timestamptz' }),
|
|
__metadata("design:type", Date)
|
|
], FotoAvance.prototype, "createdAt", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ name: 'created_by', type: 'uuid', nullable: true }),
|
|
__metadata("design:type", Object)
|
|
], FotoAvance.prototype, "createdById", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ name: 'deleted_at', type: 'timestamptz', nullable: true }),
|
|
__metadata("design:type", Object)
|
|
], FotoAvance.prototype, "deletedAt", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ name: 'deleted_by', type: 'uuid', nullable: true }),
|
|
__metadata("design:type", Object)
|
|
], FotoAvance.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)
|
|
], FotoAvance.prototype, "tenant", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.ManyToOne)(() => avance_obra_entity_1.AvanceObra, (a) => a.fotos),
|
|
(0, typeorm_1.JoinColumn)({ name: 'avance_id' }),
|
|
__metadata("design:type", avance_obra_entity_1.AvanceObra)
|
|
], FotoAvance.prototype, "avance", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.ManyToOne)(() => user_entity_1.User),
|
|
(0, typeorm_1.JoinColumn)({ name: 'created_by' }),
|
|
__metadata("design:type", Object)
|
|
], FotoAvance.prototype, "createdBy", void 0);
|
|
exports.FotoAvance = FotoAvance = __decorate([
|
|
(0, typeorm_1.Entity)({ schema: 'construction', name: 'fotos_avance' }),
|
|
(0, typeorm_1.Index)(['tenantId']),
|
|
(0, typeorm_1.Index)(['avanceId'])
|
|
], FotoAvance);
|
|
//# sourceMappingURL=foto-avance.entity.js.map
|