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