"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.InvoiceItem = void 0; const typeorm_1 = require("typeorm"); const invoice_entity_1 = require("./invoice.entity"); let InvoiceItem = class InvoiceItem { }; exports.InvoiceItem = InvoiceItem; __decorate([ (0, typeorm_1.PrimaryGeneratedColumn)('uuid'), __metadata("design:type", String) ], InvoiceItem.prototype, "id", void 0); __decorate([ (0, typeorm_1.Column)({ name: 'invoice_id' }), __metadata("design:type", String) ], InvoiceItem.prototype, "invoiceId", void 0); __decorate([ (0, typeorm_1.Column)({ name: 'product_id', nullable: true }), __metadata("design:type", String) ], InvoiceItem.prototype, "productId", void 0); __decorate([ (0, typeorm_1.Column)({ name: 'clave_prod_serv', length: 8 }), __metadata("design:type", String) ], InvoiceItem.prototype, "claveProdServ", void 0); __decorate([ (0, typeorm_1.Column)({ name: 'no_identificacion', length: 100, nullable: true }), __metadata("design:type", String) ], InvoiceItem.prototype, "noIdentificacion", void 0); __decorate([ (0, typeorm_1.Column)({ length: 1000 }), __metadata("design:type", String) ], InvoiceItem.prototype, "descripcion", void 0); __decorate([ (0, typeorm_1.Column)({ type: 'decimal', precision: 12, scale: 6 }), __metadata("design:type", Number) ], InvoiceItem.prototype, "cantidad", void 0); __decorate([ (0, typeorm_1.Column)({ name: 'clave_unidad', length: 3 }), __metadata("design:type", String) ], InvoiceItem.prototype, "claveUnidad", void 0); __decorate([ (0, typeorm_1.Column)({ length: 20, nullable: true }), __metadata("design:type", String) ], InvoiceItem.prototype, "unidad", void 0); __decorate([ (0, typeorm_1.Column)({ name: 'valor_unitario', type: 'decimal', precision: 12, scale: 6 }), __metadata("design:type", Number) ], InvoiceItem.prototype, "valorUnitario", void 0); __decorate([ (0, typeorm_1.Column)({ type: 'decimal', precision: 12, scale: 2, default: 0 }), __metadata("design:type", Number) ], InvoiceItem.prototype, "descuento", void 0); __decorate([ (0, typeorm_1.Column)({ type: 'decimal', precision: 12, scale: 2 }), __metadata("design:type", Number) ], InvoiceItem.prototype, "importe", void 0); __decorate([ (0, typeorm_1.Column)({ name: 'objeto_imp', length: 2, default: '02' }), __metadata("design:type", String) ], InvoiceItem.prototype, "objetoImp", void 0); __decorate([ (0, typeorm_1.CreateDateColumn)({ name: 'created_at' }), __metadata("design:type", Date) ], InvoiceItem.prototype, "createdAt", void 0); __decorate([ (0, typeorm_1.ManyToOne)(() => invoice_entity_1.Invoice, (invoice) => invoice.items), (0, typeorm_1.JoinColumn)({ name: 'invoice_id' }), __metadata("design:type", invoice_entity_1.Invoice) ], InvoiceItem.prototype, "invoice", void 0); exports.InvoiceItem = InvoiceItem = __decorate([ (0, typeorm_1.Entity)({ schema: 'billing', name: 'invoice_items' }) ], InvoiceItem); //# sourceMappingURL=invoice-item.entity.js.map