UNPKG

@fabrix/spool-cart

Version:

Spool - eCommerce Spool for Fabrix

36 lines (35 loc) 1.03 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const common_1 = require("@fabrix/fabrix/dist/common"); const spool_sequelize_1 = require("@fabrix/spool-sequelize"); class CustomerAccount extends common_1.FabrixModel { static get resolver() { return spool_sequelize_1.SequelizeResolver; } static config(app, Sequelize) { return { options: { underscored: true } }; } static schema(app, Sequelize) { return { id: { type: Sequelize.INTEGER, primaryKey: true, autoIncrement: true }, account_id: { type: Sequelize.INTEGER, unique: 'customeraccount_account' }, customer_id: { type: Sequelize.INTEGER, unique: 'customeraccount_account', references: null } }; } } exports.CustomerAccount = CustomerAccount;