"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.Color = void 0;
const typeorm_1 = require("typeorm");
const product_entity_1 = require("./product.entity");
const stock_entity_1 = require("./stock.entity");
const supplier_product_size_entity_1 = require("./supplier-product-size.entity");
const supplier_product_entity_1 = require("./supplier-product.entity");
let Color = class Color {
    id;
    name;
    created_at;
    updated_at;
    products;
    stocks;
    supplierProductSizes;
    supplierProducts;
};
exports.Color = Color;
__decorate([
    (0, typeorm_1.PrimaryGeneratedColumn)(),
    __metadata("design:type", Number)
], Color.prototype, "id", void 0);
__decorate([
    (0, typeorm_1.Column)({ unique: true }),
    __metadata("design:type", String)
], Color.prototype, "name", void 0);
__decorate([
    (0, typeorm_1.CreateDateColumn)(),
    __metadata("design:type", Date)
], Color.prototype, "created_at", void 0);
__decorate([
    (0, typeorm_1.UpdateDateColumn)(),
    __metadata("design:type", Date)
], Color.prototype, "updated_at", void 0);
__decorate([
    (0, typeorm_1.ManyToMany)(() => product_entity_1.Product, (product) => product.colors),
    __metadata("design:type", Array)
], Color.prototype, "products", void 0);
__decorate([
    (0, typeorm_1.OneToMany)(() => stock_entity_1.Stock, (stock) => stock.color),
    __metadata("design:type", Array)
], Color.prototype, "stocks", void 0);
__decorate([
    (0, typeorm_1.OneToMany)(() => supplier_product_size_entity_1.SupplierProductSize, (supplierProductSize) => supplierProductSize.color),
    __metadata("design:type", Array)
], Color.prototype, "supplierProductSizes", void 0);
__decorate([
    (0, typeorm_1.OneToMany)(() => supplier_product_entity_1.SupplierProduct, (supplierProduct) => supplierProduct.color),
    __metadata("design:type", Array)
], Color.prototype, "supplierProducts", void 0);
exports.Color = Color = __decorate([
    (0, typeorm_1.Entity)("colors")
], Color);
//# sourceMappingURL=color.entity.js.map