All files / dist/examples/order/models product-variant.js

95.65% Statements 22/23
100% Branches 0/0
50% Functions 1/2
95.65% Lines 22/23

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  1x 1x 1x 1x 1x                                 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x     1x           1x 1x            
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.productVariantEntity = exports.ProductVariants = exports.ProductVariant = exports.columns = exports.tableName = void 0;
const product_1 = require("./product");
exports.tableName = 'product_variant';
exports.columns = [
    'id',
    { column: 'product_id', references: product_1.Product },
    'actual_product_variant_id',
    'color_id',
    'gender_id',
    'size_id',
    '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.colorId = props.colorId;
        this.genderId = props.genderId;
        this.sizeId = props.sizeId;
        this.barcode = props.barcode;
        this.price = props.price;
        this.compareAtPrice = props.compareAtPrice;
        this.createdDate = props.createdDate;
        this.updatedDate = props.updatedDate;
        this.grams = props.grams;
        this.requiresShipping = props.requiresShipping;
    }
}
exports.ProductVariant = ProductVariant;
class ProductVariants {
    constructor({ models }) {
        this.models = models;
    }
}
exports.ProductVariants = ProductVariants;
exports.productVariantEntity = {
    tableName: exports.tableName,
    columns: exports.columns,
    Model: ProductVariant,
    Collection: ProductVariants,
};