<commit_before>'use strict'

const db = require('APP/db')
    , {User, Thing, Favorite, Product, Order, Review, Purchase, Promise} = db
    , {mapValues} = require('lodash')

function seedEverything() {
  const seeded = {
    users: users(),
    things: things(),
    products: products(),
    orders: orders(),
    reviews: reviews(),
    purchases: purchases()
  }

  seeded.favorites = favorites(seeded)

  return Promise.props(seeded)
}

const users = seed(User, {
  god: {
    email: '<EMAIL>',
    type: 'admin',
    name: 'So many names',
    shippingAddress: '1600 Pearly Gate Burning Bush, Egypt 66666',
    phoneNumber: '316-316-5555',
    password: '<PASSWORD>',
    githubID: 'strangefrond',
  },
  barack: {
    name: '<NAME>',
    email: '<EMAIL>',
    password: '<PASSWORD>'
  },
})

const purchases = seed(Purchase, {
  firstPurchase: {purchasePrice: 75.01, quantity: 3, product_id: 1, order_id: 1},
  secondPurchase: {purchasePrice: 12.34, quantity: 1, product_id: 2, order_id: 1}
})

const things = seed(Thing, {
  surfing: {name: 'surfing'},
  smiting: {name: 'smiting'},
  puppies: {name: 'puppies'},
})

const products = seed(Product, {
  photos1: {
    name: 'Basic Photo Package',
    description: 'Let us take product photos for your website, increasing traffic and sales! Send us your product and we will send you five professional photos on a white background for your product.',
    price: '99',
    leadTime: 7,
    imageURL: 'https://static1.squarespace.com/static/586feeb08419c2130fdda9fb/587e69dbe58c621e10202f76/587e6a512e69cf0b68443078/1484679763661/Paper-photography-06.jpg?format=750w',
    isActive: true
  },
  photos2: {
    name: 'Premium Photo Package',
    description: 'Let us take product photos for your website, increasing traffic and sales! Send us your product and we will send you ten professional photos on a white background for your product.',
    price: '150',
    leadTime: 14,
    imageURL: 'https://static1.squarespace.com/static/586feeb08419c2130fdda9fb/587d6188c534a59c410c049e/587d6189be65944eb793fa80/1484611979834/Electronics_Photography_3.jpg?format=750w',
    isActive: true
  }
})

const orders = seed(Order, {
  simpleOrder: {status: 'inCart', deliveryDay: new Date(), user: 1},
  placedOrder: {status: 'completed', deliveryDay: new Date(), user: 2}
})<commit_msg>seed works and server runs<commit_after>'use strict'

const db = require('APP/db')
    , {User, Thing, Favorite, Product, Order, Review, Purchase, Promise} = db
    , {mapValues} = require('lodash')

function seedEverything() {
  const seeded = {
    users: users(),
    things: things(),
    products: products(),
    orders: orders(),
    reviews: reviews(),
    purchases: purchases()
  }

  seeded.favorites = favorites(seeded)

  return Promise.props(seeded)
}

const users = seed(User, {
  god: {
    email: '<EMAIL>',
    type: 'admin',
    name: 'So many names',
    shippingAddress: '1600 Pearly Gate Burning Bush, Egypt 66666',
    phoneNumber: '316-316-5555',
    password: '<PASSWORD>',
    githubID: 'strangefrond',
  },
  barack: {
    name: '<NAME>',
    email: '<EMAIL>',
    password: '<PASSWORD>'
  },
})

const purchases = seed(Purchase, {
  firstPurchase: {purchasePrice: 75.01, quantity: 3, product_id: 1, order_id: 1},
  secondPurchase: {purchasePrice: 12.34, quantity: 1, product_id: 2, order_id: 1}
})

const things = seed(Thing, {
  surfing: {name: 'surfing'},
  smiting: {name: 'smiting'},
  puppies: {name: 'puppies'},
})

const products = seed(Product, {
  photos1: {
    name: 'Basic Photo Package',
    description: 'Let us take product photos for your website, increasing traffic and sales! Send us your product and we will send you five professional photos on a white background for your product.',
    price: '99',
    leadTime: 7,
    imageURL: 'https://static1.squarespace.com/static/586feeb08419c2130fdda9fb/587e69dbe58c621e10202f76/587e6a512e69cf0b68443078/1484679763661/Paper-photography-06.jpg?format=750w',
    isActive: true
  },
  photos2: {
    name: 'Premium Photo Package',
    description: 'Let us take product photos for your website, increasing traffic and sales! Send us your product and we will send you ten professional photos on a white background for your product.',
    price: '150',
    leadTime: 14,
    imageURL: 'https://static1.squarespace.com/static/586feeb08419c2130fdda9fb/587d6188c534a59c410c049e/587d6189be65944eb793fa80/1484611979834/Electronics_Photography_3.jpg?format=750w',
    isActive: true
  }
})

const orders = seed(Order, {
  simpleOrder: {status: 'inCart', deliveryDay: new Date()},
  placedOrder: {status: 'completed', deliveryDay: new Date()}
})
{'fraction_non_alphanumeric': 0.13115459041066438, 'fraction_numerical': 0.07611266394323801, 'mean_word_length': 4.197765363128491, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2578659', 'n_tokens_mistral': 1792, 'n_tokens_neox': 1568, 'n_words': 428}