floriday/models/supplier/suppliers.js

59 lines
1.2 KiB
JavaScript
Raw Normal View History

2023-01-16 13:52:08 +00:00
import { Sequelize } from 'sequelize';
const suppliers = {
2023-04-03 16:11:55 +00:00
sequenceNumber: {
type: Sequelize.INTEGER,
allowNull: false,
primaryKey: true,
},
organizationId: {
type: Sequelize.STRING,
allowNull: false,
primaryKey: true,
2023-04-03 16:11:55 +00:00
},
companyGln: {
type: Sequelize.STRING,
},
name: {
type: Sequelize.STRING,
2023-02-03 12:56:34 +00:00
},
commercialName: {
type: Sequelize.STRING,
},
email: {
type: Sequelize.STRING,
},
phone: {
type: Sequelize.STRING,
},
website: {
type: Sequelize.STRING,
},
2023-04-03 16:11:55 +00:00
rfhRelationId: {
type: Sequelize.INTEGER,
2023-02-03 12:56:34 +00:00
},
2023-04-03 16:11:55 +00:00
paymentProviders: {
2023-02-03 12:56:34 +00:00
type: Sequelize.STRING,
},
endDate: {
type: Sequelize.DATE,
},
2023-04-03 16:11:55 +00:00
mailingAddress: {
type: Sequelize.JSON,
2023-02-03 12:56:34 +00:00
},
2023-04-03 16:11:55 +00:00
physicalAddress: {
type: Sequelize.JSON,
},
isConnected: {
type: Sequelize.BOOLEAN,
defaultValue: false,
},
2023-01-16 13:52:08 +00:00
};
export default (sequelize) => {
const Suppliers = sequelize.define('suppliers', suppliers, {
2023-01-16 13:52:08 +00:00
timestamps: false,
freezeTableName: true,
});
return Suppliers;
};