UNPKG

@briswell/bw-domain

Version:

Domain Library for Node.js

63 lines (62 loc) 1.73 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const Sequelize = require("sequelize"); exports.default = (sqlize) => { return sqlize.define('claim', { id: { allowNull: false, autoIncrement: true, primaryKey: true, type: Sequelize.BIGINT(20).UNSIGNED }, customerId: { type: Sequelize.BIGINT(20).UNSIGNED, field: 'customer_id' }, orderId: { type: Sequelize.BIGINT(20).UNSIGNED, field: 'order_id' }, title: { type: Sequelize.STRING(200), }, contents: { type: Sequelize.STRING(1000), }, 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: 'claim', paranoid: true }); };