"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);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
    return function (target, key) { decorator(target, key, paramIndex); }
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.BrandSeedService = void 0;
const common_1 = require("@nestjs/common");
const typeorm_1 = require("@nestjs/typeorm");
const brand_entity_1 = require("../../../brands/entities/brand.entity");
const typeorm_2 = require("typeorm");
let BrandSeedService = class BrandSeedService {
    constructor(repository) {
        this.repository = repository;
    }
    async run() {
        console.log("Brand seed started...");
        let i = 1;
        let brands = [
            {
                id: i++, name: "Phoenix Contact",
                logo: { path: "https://plc-trade.com/pub/259813/norm-phoenix-contact.webp" }
            },
            {
                id: i++, name: "Siemens",
                logo: { path: "https://plc-trade.com/pub/1/norm-siemens.webp" }
            },
            {
                id: i++, name: "Schneider Electric",
                logo: { path: "https://plc-trade.com/pub/2/norm-schneider.webp" }
            },
            {
                id: i++, name: "ABB",
                logo: { path: "https://plc-trade.com/pub/930389/norm-abb.webp" }
            },
            {
                id: i++, name: "Omron",
                logo: { path: "https://plc-trade.com/pub/177952/norm-omron.webp" }
            },
            {
                id: i++, name: "Pepperl+Fuchs",
                logo: { path: "https://plc-trade.com/pub/421655/norm-pepperl-fuchs.webp" }
            },
            {
                id: i++, name: "Baumer",
                logo: { path: "https://plc-trade.com/pub/334159/norm-baumer.webp" }
            },
            {
                id: i++, name: "SICK",
                logo: { path: "https://plc-trade.com/pub/477550/norm-sick.webp" }
            },
            {
                id: i++, name: "Turck",
                logo: { path: "https://plc-trade.com/pub/506912/norm-turck.webp" }
            },
            {
                id: i++, name: "WEINTEK",
                logo: { path: "https://plc-trade.com/pub/253888/norm-weintek.webp" }
            }
        ];
        brands = await this.repository.save(brands);
        console.log("Brand seed completed.");
        return brands;
    }
};
exports.BrandSeedService = BrandSeedService;
exports.BrandSeedService = BrandSeedService = __decorate([
    (0, common_1.Injectable)(),
    __param(0, (0, typeorm_1.InjectRepository)(brand_entity_1.Brand)),
    __metadata("design:paramtypes", [typeorm_2.Repository])
], BrandSeedService);
//# sourceMappingURL=brand-seed.service.js.map