text: 'use strict';
  const {
    Model
  } = require('sequelize');
  module.exports = (sequelize, DataTypes) => {
    class Cart extends Model {
      /**
       * Helper method for defining associations.
       * This method is not a part of Sequelize lifecycle.
       * The `models/index` file will call this method automatically.
       */
      static associate(models) {
        // define association here
        this.belongsTo(models.User, { foreignKey: 'user_id' });
        this.belongsTo(models.Sock, { foreignKey: 'sock_id' });
      }
    }
    Cart.init({
      user_id: DataTypes.INTEGER,
      sock_id: DataTypes.INTEGER,
      count: DataTypes.INTEGER,
    }, {
      sequelize,
      modelName: 'Cart',
    });
    return Cart;
  };
  