All files / dist/examples/order-more/business-objects product-variant.js

100% Statements 33/33
100% Branches 0/0
100% Functions 2/2
100% Lines 33/33

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64  1x 1x 1x 1x 1x 1x 1x 1x 1x                                     69x 69x 69x 69x 69x 69x 69x 69x 69x 69x 69x 69x 69x 69x 69x 69x 69x 69x 69x 69x     1x     6x     1x 1x            
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.productVariantConfiguration = exports.ProductVariants = exports.ProductVariant = exports.columns = exports.tableName = void 0;
const product_1 = require("./product");
const actual_product_variant_1 = require("./actual-product-variant");
const color_1 = require("./color");
const gender_1 = require("./gender");
const size_1 = require("./size");
exports.tableName = 'product_variant';
exports.columns = [
    'id',
    { column: 'product_id', references: product_1.Product },
    { column: 'actual_product_variant_id', references: actual_product_variant_1.ActualProductVariant },
    { column: 'color_id', references: color_1.Color },
    { column: 'gender_id', references: gender_1.Gender },
    { column: 'size_id', references: size_1.Size },
    'shopify_id',
    'image_url',
    'barcode',
    'price',
    'compare_at_price',
    'created_date',
    'updated_date',
    'grams',
    'requires_shipping'
];
class ProductVariant {
    constructor(props) {
        this.id = props.id;
        this.productId = props.productId;
        this.product = props.product;
        this.actualProductVariantId = props.actualProductVariantId;
        this.actualProductVariant = props.actualProductVariant;
        this.colorId = props.colorId;
        this.color = props.color;
        this.genderId = props.genderId;
        this.gender = props.gender;
        this.sizeId = props.sizeId;
        this.size = props.size;
        this.shopifyId = props.shopifyId;
        this.imageUrl = props.imageUrl;
        this.barcode = props.barcode;
        this.price = props.price;
        this.compareAtPrice = props.compareAtPrice;
        this.createdDate = props.createDate;
        this.updatedDate = props.updateDate;
        this.grams = props.grams;
        this.requiresShipping = props.requiresShipping;
    }
}
exports.ProductVariant = ProductVariant;
class ProductVariants {
    constructor({ models }) {
        this.models = models;
    }
}
exports.ProductVariants = ProductVariants;
exports.productVariantConfiguration = {
    tableName: exports.tableName,
    columns: exports.columns,
    entityClass: ProductVariant,
    collectionClass: ProductVariants,
};