michangarrito/apps/backend/dist/modules/inventory/entities/inventory-movement.entity.js
rckrdmrd 48dea7a5d0 feat: Initial commit - michangarrito
Marketplace móvil para negocios locales mexicanos.

Estructura inicial:
- apps/backend (NestJS API)
- apps/frontend (React Web)
- apps/mobile (Expo/React Native)
- apps/mcp-server (Claude MCP Server)
- apps/whatsapp-service (WhatsApp Business API)
- database/ (PostgreSQL DDL)
- docs/ (Documentación)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 04:41:02 -06:00

91 lines
4.2 KiB
JavaScript

"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.InventoryMovement = exports.MovementType = void 0;
const typeorm_1 = require("typeorm");
const product_entity_1 = require("../../products/entities/product.entity");
var MovementType;
(function (MovementType) {
MovementType["PURCHASE"] = "purchase";
MovementType["SALE"] = "sale";
MovementType["ADJUSTMENT"] = "adjustment";
MovementType["LOSS"] = "loss";
MovementType["RETURN"] = "return";
MovementType["TRANSFER"] = "transfer";
})(MovementType || (exports.MovementType = MovementType = {}));
let InventoryMovement = class InventoryMovement {
};
exports.InventoryMovement = InventoryMovement;
__decorate([
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
__metadata("design:type", String)
], InventoryMovement.prototype, "id", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'tenant_id' }),
__metadata("design:type", String)
], InventoryMovement.prototype, "tenantId", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'product_id' }),
__metadata("design:type", String)
], InventoryMovement.prototype, "productId", void 0);
__decorate([
(0, typeorm_1.Column)({
name: 'movement_type',
type: 'varchar',
length: 20,
}),
__metadata("design:type", String)
], InventoryMovement.prototype, "movementType", void 0);
__decorate([
(0, typeorm_1.Column)({ type: 'decimal', precision: 10, scale: 3 }),
__metadata("design:type", Number)
], InventoryMovement.prototype, "quantity", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'quantity_before', type: 'decimal', precision: 10, scale: 3 }),
__metadata("design:type", Number)
], InventoryMovement.prototype, "quantityBefore", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'quantity_after', type: 'decimal', precision: 10, scale: 3 }),
__metadata("design:type", Number)
], InventoryMovement.prototype, "quantityAfter", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'unit_cost', type: 'decimal', precision: 10, scale: 2, nullable: true }),
__metadata("design:type", Number)
], InventoryMovement.prototype, "unitCost", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'reference_type', length: 20, nullable: true }),
__metadata("design:type", String)
], InventoryMovement.prototype, "referenceType", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'reference_id', nullable: true }),
__metadata("design:type", String)
], InventoryMovement.prototype, "referenceId", void 0);
__decorate([
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
__metadata("design:type", String)
], InventoryMovement.prototype, "notes", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'created_by', nullable: true }),
__metadata("design:type", String)
], InventoryMovement.prototype, "createdBy", void 0);
__decorate([
(0, typeorm_1.CreateDateColumn)({ name: 'created_at' }),
__metadata("design:type", Date)
], InventoryMovement.prototype, "createdAt", void 0);
__decorate([
(0, typeorm_1.ManyToOne)(() => product_entity_1.Product),
(0, typeorm_1.JoinColumn)({ name: 'product_id' }),
__metadata("design:type", product_entity_1.Product)
], InventoryMovement.prototype, "product", void 0);
exports.InventoryMovement = InventoryMovement = __decorate([
(0, typeorm_1.Entity)({ schema: 'inventory', name: 'inventory_movements' })
], InventoryMovement);
//# sourceMappingURL=inventory-movement.entity.js.map