text: const Sequelize = require('sequelize')
  const db = require('../db')
  
  const Tea = db.define('tea', {
    name: {
      type: Sequelize.STRING,
      allowNull: false,
      validate: {
        notEmpty: true
      }
    },
    flavor: {
      type: Sequelize.STRING,
      allowNull: false,
      validate: {
        notEmpty: true
      }
    },
    description: {
      type: Sequelize.TEXT,
      allowNull: false,
      validate: {
        notEmpty: true
      }
    },
    price: {
      type: Sequelize.INTEGER,
      allowNull: false,
      validate: {
        notEmpty: true
      }
    },
    inventory: {
      type: Sequelize.INTEGER,
      defaultValue: 100,
      allowNull: false,
      validate: {
        notEmpty: true
      }
    },
    imageUrl: {
      type: Sequelize.STRING,
      defaultValue:
        'http://cdn.shopify.com/s/files/1/0994/9584/products/sweet_tea_leaves-2_600x.jpg?v=1536186114',
      allowNull: false
    }
  })
  
  module.exports = Tea
  