floriday/models/supplier/suppliers.js

58 lines
1.1 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,
},
companyGln: {
type: Sequelize.STRING,
},
name: {
type: Sequelize.STRING,
2023-02-03 12:56:34 +00:00
},
commercialName: {
type: Sequelize.STRING,
allowNull: false,
},
email: {
type: Sequelize.STRING,
},
phone: {
type: Sequelize.STRING,
},
website: {
type: Sequelize.STRING,
},
organizationId: {
type: Sequelize.STRING,
2023-01-16 13:52:08 +00:00
primaryKey: true,
},
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('FDsuppliers', suppliers, {
timestamps: false,
freezeTableName: true,
});
return Suppliers;
};