Soy estudiante y de antemano agradezco la ayuda al intentar crear un customer en insomnia me arroja el siguiente error, ya repase el codigo varias veces y no encuentro mi error del porque envia todo nulo { "statusCode": 409, "message": "SequelizeValidationError", "errors": [ { "message": "Customer.name cannot be null", "type": "notNull Violation", "path": "name", "value": null, "origin": "CORE", "instance": { "sendOffer": true, "createdAt": "2023-07-03T00:48:01.470Z", "id": null }, "validatorKey": "is_null", "validatorName": null, "validatorArgs": [] }, { "message": "Customer.lastName cannot be null", "type": "notNull Violation", "path": "lastName", "value": null, "origin": "CORE", "instance": { "sendOffer": true, "createdAt": "2023-07-03T00:48:01.470Z", "id": null }, "validatorKey": "is_null", "validatorName": null, "validatorArgs": [] }, { "message": "Customer.phone cannot be null", "type": "notNull Violation", "path": "phone", "value": null, "origin": "CORE", "instance": { "sendOffer": true, "createdAt": "2023-07-03T00:48:01.470Z", "id": null }, "validatorKey": "is_null", "validatorName": null, "validatorArgs": [] } ] } Error que arroja en terminal ValidationError [SequelizeValidationError]: notNull Violation: Customer.name cannot be null, notNull Violation: Customer.lastName cannot be null, notNull Violation: Customer.phone cannot be null at InstanceValidator._validate (/home/practicas/e-wallet- solo/node_modules/sequelize/lib/instance-validator.js:50:13) at async InstanceValidator._validateAndRunHooks (/home/practicas/e-wallet- solo/node_modules/sequelize/lib/instance-validator.js:60:7) at async InstanceValidator.validate (/home/practicas/e-wallet- solo/node_modules/sequelize/lib/instance-validator.js:54:12) at async Customer.save (/home/practicas/e-wallet- solo/node_modules/sequelize/lib/model.js:2426:7) at async Customer.create (/home/practicas/e-wallet- solo/node_modules/sequelize/lib/model.js:1362:12) at async CustomerService.create (/home/practicas/e-wallet- solo/services/customers.service.js:21:25) at async /home/practicas/e-wallet-solo/routes/customers.router.js:42:28 { errors: [ ValidationErrorItem { message: 'Customer.name cannot be null', type: 'notNull Violation', path: 'name', value: null, origin: 'CORE', instance: [Customer], validatorKey: 'is_null', validatorName: null, validatorArgs: [] }, ValidationErrorItem { message: 'Customer.lastName cannot be null', type: 'notNull Violation', path: 'lastName', value: null, origin: 'CORE', instance: [Customer], validatorKey: 'is_null', validatorName: null, validatorArgs: [] }, ValidationErrorItem { message: 'Customer.phone cannot be null', type: 'notNull Violation', path: 'phone', value: null, origin: 'CORE', instance: [Customer], validatorKey: 'is_null', validatorName: null, validatorArgs: [] } ] } codigo de customer.service const boom = require('@hapi/boom') const { models } = require('../libs/sequelize') class CustomerService { constructor() {} async find() { const customer = await models.Customer.findAll() return customer } async findOne(id) { const customer = await models.Customer.findByPk(id) if(!customer) { throw boom.notFound('customer not found') } return customer } async create(data) { const newCustomer = await models.Customer.create(data) return newCustomer } async update(id, changes) { const model = await this.findOne(id) const customer = await model.update(changes) return customer } async delete(id) { const model = await this.findOne(id) await model.destroy() return { rta: true } } } module.exports = CustomerService codigo de customer.router const express = require('express') const CustomerService = require('../services/customers.service') const validatorHandler = require('../middlewares/validator.handlres') const { getCustomerSchema, createCustomerSchema, updateCustomerSchema } = require('../schemas/customer.schema') const router = express.Router() const service = new CustomerService() router.get('/', async (req, res, next) => { try { const customers = await service.find() res.json(customers) } catch (error) { next(error) } } ) router.get( '/:id', validatorHandler(getCustomerSchema, 'params'), async (req, res, next) => { try { const { id } = req.params const customer = await service.findOne(id) res.json(customer) } catch (error) { next(error) } } ) router.post( '/', validatorHandler(createCustomerSchema, 'body'), async (req, res, next) => { try { const body = req.body res.status(201).json(await service.create(body)) } catch (error) { next(error) } } ) router.patch( '/:id', validatorHandler(getCustomerSchema, 'params'), validatorHandler(updateCustomerSchema, 'body'), async (req, res, next) => { try { const { id } = req.params const body = req.body const customer = await service.update(id, body) res.json(customer) } catch (error) { next(error) } } ) router.delete( '/:id', validatorHandler(getCustomerSchema, 'params'), async (req, res) => { const { id } = req.params const customer = await service.delete(id) res.json(customer) } ) module.exports = router codigo de customer.schema const Joi = require('joi') const id = Joi.number().integer() const name = Joi.string() const lastName = Joi.string() const email = Joi.string().email() const phone = Joi.string() const totalSpent = Joi.number().integer() const wallet = Joi.number().integer() const sendOffer = Joi.boolean() const getCustomerSchema = Joi.object({ id: id.required() }) const createCustomerSchema = Joi.object({ name: name, lastName: lastName, email: email, phone: phone, sendOffer: sendOffer }) const updateCustomerSchema = Joi.object({ name, lastName, email, phone, totalSpent, wallet, sendOffer, }) module.exports = { getCustomerSchema, createCustomerSchema, updateCustomerSchema } les comparto el customer.model const { Model, DataTypes, Sequelize } = require('sequelize') const CUSTOMER_TABLE = 'customers' const CustomerSchema = { id: { allowNull: false, autoIncrement: true, primaryKey: true, type: DataTypes.INTEGER }, name: { allowNull: false, type: DataTypes.STRING }, lastName: { allowNull: false, field: 'last_name', type: DataTypes.STRING }, email: { allowNull: true, type: DataTypes.STRING, aunique: true }, phone: { allowNull: false, type: DataTypes.STRING }, totalSpent: { allowNull: true, field: 'total_spent', type: DataTypes.INTEGER }, wallet: { allowNull: true, type: DataTypes.INTEGER }, sendOffer: { allowNull: true, field: 'send_offer', type: DataTypes.BOOLEAN, defaultValue: true }, createdAt: { allowNull: false, type: DataTypes.DATE, field: 'create_at', defaultValue: Sequelize.NOW } } class Customer extends Model { static associate() { // } static config(sequelize) { return { sequelize, tableName: CUSTOMER_TABLE, modelName: 'Customer', timestamps: false } } } module.exports = { CUSTOMER_TABLE, CustomerSchema, Customer } del customer.models elimine los allowNull y si se creo pero todo estaba en null Lorem ipsum dolor sit amet consectetur adipisicing elit. Beatae magnam amet facilis incidunt illo accusamus dolore excepturi aut officiis, autem perferendis expedita numquam ad nobis facere quasi vel voluptatibus quibusdam aspernatur delectus repudiandae error assumenda nesciunt molestiae! Vitae sit nobis nihil odit ad provident necessitatibus veritatis voluptates quasi, mollitia sequi sint.