"use strict";
/**
 * Prototipo Entity
 * Prototipos de vivienda (modelos)
 *
 * @module Construction
 */
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.Prototipo = void 0;
const typeorm_1 = require("typeorm");
let Prototipo = class Prototipo {
    id;
    tenantId;
    code;
    name;
    description;
    type;
    areaConstructionM2;
    areaTerrainM2;
    bedrooms;
    bathrooms;
    parkingSpaces;
    floors;
    basePrice;
    blueprintUrl;
    renderUrl;
    isActive;
    metadata;
    createdAt;
    createdBy;
    updatedAt;
    updatedBy;
    deletedAt;
};
exports.Prototipo = Prototipo;
__decorate([
    (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
    __metadata("design:type", String)
], Prototipo.prototype, "id", void 0);
__decorate([
    (0, typeorm_1.Column)({ name: 'tenant_id', type: 'uuid' }),
    __metadata("design:type", String)
], Prototipo.prototype, "tenantId", void 0);
__decorate([
    (0, typeorm_1.Column)({ type: 'varchar', length: 20 }),
    __metadata("design:type", String)
], Prototipo.prototype, "code", void 0);
__decorate([
    (0, typeorm_1.Column)({ type: 'varchar', length: 100 }),
    __metadata("design:type", String)
], Prototipo.prototype, "name", void 0);
__decorate([
    (0, typeorm_1.Column)({ type: 'text', nullable: true }),
    __metadata("design:type", String)
], Prototipo.prototype, "description", void 0);
__decorate([
    (0, typeorm_1.Column)({ type: 'varchar', length: 50, default: 'horizontal' }),
    __metadata("design:type", String)
], Prototipo.prototype, "type", void 0);
__decorate([
    (0, typeorm_1.Column)({ name: 'area_construction_m2', type: 'decimal', precision: 10, scale: 2, nullable: true }),
    __metadata("design:type", Number)
], Prototipo.prototype, "areaConstructionM2", void 0);
__decorate([
    (0, typeorm_1.Column)({ name: 'area_terrain_m2', type: 'decimal', precision: 10, scale: 2, nullable: true }),
    __metadata("design:type", Number)
], Prototipo.prototype, "areaTerrainM2", void 0);
__decorate([
    (0, typeorm_1.Column)({ type: 'integer', default: 0 }),
    __metadata("design:type", Number)
], Prototipo.prototype, "bedrooms", void 0);
__decorate([
    (0, typeorm_1.Column)({ type: 'decimal', precision: 3, scale: 1, default: 0 }),
    __metadata("design:type", Number)
], Prototipo.prototype, "bathrooms", void 0);
__decorate([
    (0, typeorm_1.Column)({ name: 'parking_spaces', type: 'integer', default: 0 }),
    __metadata("design:type", Number)
], Prototipo.prototype, "parkingSpaces", void 0);
__decorate([
    (0, typeorm_1.Column)({ type: 'integer', default: 1 }),
    __metadata("design:type", Number)
], Prototipo.prototype, "floors", void 0);
__decorate([
    (0, typeorm_1.Column)({ name: 'base_price', type: 'decimal', precision: 14, scale: 2, nullable: true }),
    __metadata("design:type", Number)
], Prototipo.prototype, "basePrice", void 0);
__decorate([
    (0, typeorm_1.Column)({ name: 'blueprint_url', type: 'varchar', length: 500, nullable: true }),
    __metadata("design:type", String)
], Prototipo.prototype, "blueprintUrl", void 0);
__decorate([
    (0, typeorm_1.Column)({ name: 'render_url', type: 'varchar', length: 500, nullable: true }),
    __metadata("design:type", String)
], Prototipo.prototype, "renderUrl", void 0);
__decorate([
    (0, typeorm_1.Column)({ name: 'is_active', type: 'boolean', default: true }),
    __metadata("design:type", Boolean)
], Prototipo.prototype, "isActive", void 0);
__decorate([
    (0, typeorm_1.Column)({ type: 'jsonb', default: {} }),
    __metadata("design:type", Object)
], Prototipo.prototype, "metadata", void 0);
__decorate([
    (0, typeorm_1.CreateDateColumn)({ name: 'created_at', type: 'timestamptz' }),
    __metadata("design:type", Date)
], Prototipo.prototype, "createdAt", void 0);
__decorate([
    (0, typeorm_1.Column)({ name: 'created_by', type: 'uuid', nullable: true }),
    __metadata("design:type", String)
], Prototipo.prototype, "createdBy", void 0);
__decorate([
    (0, typeorm_1.UpdateDateColumn)({ name: 'updated_at', type: 'timestamptz', nullable: true }),
    __metadata("design:type", Date)
], Prototipo.prototype, "updatedAt", void 0);
__decorate([
    (0, typeorm_1.Column)({ name: 'updated_by', type: 'uuid', nullable: true }),
    __metadata("design:type", String)
], Prototipo.prototype, "updatedBy", void 0);
__decorate([
    (0, typeorm_1.Column)({ name: 'deleted_at', type: 'timestamptz', nullable: true }),
    __metadata("design:type", Date)
], Prototipo.prototype, "deletedAt", void 0);
exports.Prototipo = Prototipo = __decorate([
    (0, typeorm_1.Entity)({ schema: 'construction', name: 'prototipos' }),
    (0, typeorm_1.Index)(['tenantId', 'code'], { unique: true })
], Prototipo);
//# sourceMappingURL=prototipo.entity.js.map