This commit is contained in:
2025-11-27 16:33:42 +01:00
commit ca9ac29ea4
19 changed files with 3346 additions and 0 deletions

38
models/customer.js Normal file
View File

@@ -0,0 +1,38 @@
const { DataTypes } = require('sequelize');
const sequelize = require('../config/database');
const Customer = sequelize.define('Customer', {
firstName: {
type: DataTypes.STRING,
allowNull: false
},
lastName: {
type: DataTypes.STRING,
allowNull: false
},
address: {
type: DataTypes.STRING,
allowNull: false
},
postalCode: {
type: DataTypes.STRING,
allowNull: false
},
city: {
type: DataTypes.STRING,
allowNull: false
},
phone: {
type: DataTypes.STRING,
allowNull: false
},
nip: {
type: DataTypes.STRING,
allowNull: false
}
});
// Synchronizacja modelu z bazą
Customer.sync();
module.exports = Customer;