59 lines
1.2 KiB
JavaScript
59 lines
1.2 KiB
JavaScript
import { Sequelize } from 'sequelize';
|
|
|
|
const suppliers = {
|
|
sequenceNumber: {
|
|
type: Sequelize.INTEGER,
|
|
allowNull: false,
|
|
primaryKey: true,
|
|
},
|
|
organizationId: {
|
|
type: Sequelize.STRING,
|
|
allowNull: false,
|
|
primaryKey: true,
|
|
},
|
|
companyGln: {
|
|
type: Sequelize.STRING,
|
|
},
|
|
name: {
|
|
type: Sequelize.STRING,
|
|
},
|
|
commercialName: {
|
|
type: Sequelize.STRING,
|
|
},
|
|
email: {
|
|
type: Sequelize.STRING,
|
|
},
|
|
phone: {
|
|
type: Sequelize.STRING,
|
|
},
|
|
website: {
|
|
type: Sequelize.STRING,
|
|
},
|
|
rfhRelationId: {
|
|
type: Sequelize.INTEGER,
|
|
},
|
|
paymentProviders: {
|
|
type: Sequelize.STRING,
|
|
},
|
|
endDate: {
|
|
type: Sequelize.DATE,
|
|
},
|
|
mailingAddress: {
|
|
type: Sequelize.JSON,
|
|
},
|
|
physicalAddress: {
|
|
type: Sequelize.JSON,
|
|
},
|
|
isConnected: {
|
|
type: Sequelize.BOOLEAN,
|
|
defaultValue: false,
|
|
},
|
|
};
|
|
|
|
export default (sequelize) => {
|
|
const Suppliers = sequelize.define('suppliers', suppliers, {
|
|
timestamps: false,
|
|
freezeTableName: true,
|
|
});
|
|
return Suppliers;
|
|
}; |