All files / dist/test-utils/order-more/models order.js

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

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 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91  1x 1x 1x 1x 1x 1x 1x                                                             47x 47x 47x 47x 47x 47x 47x 47x 47x 47x 47x 47x 47x 47x 47x 47x 47x 47x 47x 47x 47x 47x 47x 47x 47x 47x 47x 47x 47x 47x 47x 47x 47x 47x 47x 47x 47x     1x     2x     1x 1x            
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.orderEntity = exports.Orders = exports.Order = exports.columns = exports.tableName = void 0;
const utm_source_1 = require("./utm-source");
const customer_1 = require("./customer");
const physical_address_1 = require("./physical-address");
exports.tableName = 'order';
exports.columns = [
    'id',
    'email',
    { column: 'customer_id', references: customer_1.Customer },
    { column: 'shipping_address_id', references: physical_address_1.PhysicalAddress },
    { column: 'billing_address_id', references: physical_address_1.PhysicalAddress },
    'browser_ip',
    'browser_user_agent',
    'kujo_imported_date',
    'created_date',
    'cancel_reason',
    'cancelled_date',
    'closed_date',
    'processed_date',
    'updated_date',
    'note',
    'subtotal_price',
    'taxes_included',
    'total_discounts',
    'total_price',
    'total_tax',
    'total_weight',
    'order_status_url',
    { column: 'utm_source_id', references: utm_source_1.UtmSource },
    'utm_medium_id',
    'utm_campaign',
    'utm_content',
    'utm_term'
];
class Order {
    constructor(props) {
        this.id = props.id;
        this.customerId = props.customerId;
        this.customer = props.customer;
        this.shippingAddressId = props.shippingAddressId;
        this.shippingAddress = props.shippingAddress;
        this.billingAddressId = props.billingAddressId;
        this.billingAddress = props.billingAddress;
        this.browserIp = props.browserIp;
        this.browserUserAgent = props.browserUserAgent;
        this.kujoImportedDate = props.kujoImportedDate;
        this.createdDate = props.createdDate;
        this.cancelReason = props.cancelReason;
        this.cancelledDate = props.cancelledDate;
        this.closedDate = props.closedDate;
        this.processedDate = props.processedDate;
        this.updatedDate = props.updatedDate;
        this.note = props.note;
        this.subtotalPrice = props.subtotalPrice;
        this.taxesIncluded = props.taxesIncluded;
        this.totalDiscounts = props.totalDiscounts;
        this.totalPrice = props.totalPrice;
        this.totalTax = props.totalTax;
        this.totalWeight = props.totalWeight;
        this.orderStatusUrl = props.orderStatusUrl;
        this.utmSourceId = props.utmSourceId;
        this.utmSource = props.utmSource;
        this.utmMediumId = props.utmMedium;
        this.utmCampaign = props.utmCampaign;
        this.utmContent = props.utmContent;
        this.utmTerm = props.utmTerm;
        this.email = props.email;
        this.subtotalPrice = props.subtotalPrice;
        this.taxesIncluded = props.taxesIncluded;
        this.totalDiscounts = props.totalDiscounts;
        this.totalPrice = props.totalPrice;
        this.utmSourceId = props.utmSourceId;
        this.utmSource = props.utmSource;
    }
}
exports.Order = Order;
class Orders {
    constructor({ models }) {
        this.models = models;
    }
}
exports.Orders = Orders;
exports.orderEntity = {
    tableName: exports.tableName,
    columns: exports.columns,
    Model: Order,
    Collection: Orders
};