UNPKG

@briswell/bw-domain

Version:

Domain Library for Node.js

70 lines (69 loc) 1.91 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const Sequelize = require("sequelize"); exports.default = (sqlize) => { return sqlize.define('quotationDetail', { id: { allowNull: false, autoIncrement: true, primaryKey: true, type: Sequelize.BIGINT(20).UNSIGNED }, quotationId: { allowNull: false, type: Sequelize.BIGINT(20).UNSIGNED, field: 'quotation_id' }, title: { type: Sequelize.STRING(200), }, detail: { type: Sequelize.STRING(300), }, unitPrice: { type: Sequelize.INTEGER(11), field: 'unit_price' }, count: { type: Sequelize.INTEGER(11) }, amount: { type: Sequelize.INTEGER(11) }, createdAt: { allowNull: false, type: Sequelize.DATE, defaultValue: Sequelize.literal('CURRENT_TIMESTAMP'), field: 'created_at' }, createdBy: { allowNull: false, type: Sequelize.BIGINT(20).UNSIGNED, field: 'created_by' }, updatedAt: { allowNull: false, type: Sequelize.DATE, defaultValue: Sequelize.literal('CURRENT_TIMESTAMP'), field: 'updated_at' }, updatedBy: { allowNull: false, type: Sequelize.BIGINT(20).UNSIGNED, field: 'updated_by' }, deletedAt: { allowNull: true, type: Sequelize.DATE, field: 'deleted_at' }, deletedBy: { allowNull: true, type: Sequelize.BIGINT(20).UNSIGNED, field: 'deleted_by' } }, { tableName: 'quotation_detail', paranoid: true }); };