const { format } = require("date-fns");

/**
 * @param { import("knex").Knex } knex
 * @returns { Promise<void> } 
 */
exports.seed = async function(knex) {
  // Deletes ALL existing entries
  await knex('domain').del()

  const date = format(new Date(), "yyyy-MM-dd HH:mm:ss");

  const domains = [
    { domain: '000000014.xyz', description: '000000014.xyz', aliases: 0, mailboxes: 0, maxquota: 0, quota: 0, transport: 'virtual', backupmx: 0, active: 1, created: date, modified: date, password_expiry: 0, in_cloudflare: 0 },
    { domain: '000000016.xyz', description: '000000016.xyz', aliases: 0, mailboxes: 0, maxquota: 0, quota: 0, transport: 'virtual', backupmx: 0, active: 1, created: date, modified: date, password_expiry: 0, in_cloudflare: 0 },
    { domain: '000000019.xyz', description: '000000019.xyz', aliases: 0, mailboxes: 0, maxquota: 0, quota: 0, transport: 'virtual', backupmx: 0, active: 1, created: date, modified: date, password_expiry: 0, in_cloudflare: 0 },
    { domain: '000000020.xyz', description: '000000020.xyz', aliases: 0, mailboxes: 0, maxquota: 0, quota: 0, transport: 'virtual', backupmx: 0, active: 1, created: date, modified: date, password_expiry: 0, in_cloudflare: 0 },
    { domain: '000000021.xyz', description: '000000021.xyz', aliases: 0, mailboxes: 0, maxquota: 0, quota: 0, transport: 'virtual', backupmx: 0, active: 1, created: date, modified: date, password_expiry: 0, in_cloudflare: 0 },
    { domain: '000000023.xyz', description: '000000023.xyz', aliases: 0, mailboxes: 0, maxquota: 0, quota: 0, transport: 'virtual', backupmx: 0, active: 1, created: date, modified: date, password_expiry: 0, in_cloudflare: 0 },
    { domain: '000000024.xyz', description: '000000024.xyz', aliases: 0, mailboxes: 0, maxquota: 0, quota: 0, transport: 'virtual', backupmx: 0, active: 1, created: date, modified: date, password_expiry: 0, in_cloudflare: 0 },
    { domain: '000000025.xyz', description: '000000025.xyz', aliases: 0, mailboxes: 0, maxquota: 0, quota: 0, transport: 'virtual', backupmx: 0, active: 1, created: date, modified: date, password_expiry: 0, in_cloudflare: 0 },
    { domain: '000000026.xyz', description: '000000026.xyz', aliases: 0, mailboxes: 0, maxquota: 0, quota: 0, transport: 'virtual', backupmx: 0, active: 1, created: date, modified: date, password_expiry: 0, in_cloudflare: 0 },
    { domain: '000000027.xyz', description: '000000027.xyz', aliases: 0, mailboxes: 0, maxquota: 0, quota: 0, transport: 'virtual', backupmx: 0, active: 1, created: date, modified: date, password_expiry: 0, in_cloudflare: 0 },
    { domain: '000000029.xyz', description: '000000029.xyz', aliases: 0, mailboxes: 0, maxquota: 0, quota: 0, transport: 'virtual', backupmx: 0, active: 1, created: date, modified: date, password_expiry: 0, in_cloudflare: 0 },
    { domain: '000000030.xyz', description: '000000030.xyz', aliases: 0, mailboxes: 0, maxquota: 0, quota: 0, transport: 'virtual', backupmx: 0, active: 1, created: date, modified: date, password_expiry: 0, in_cloudflare: 0 },
    { domain: '000000031.xyz', description: '000000031.xyz', aliases: 0, mailboxes: 0, maxquota: 0, quota: 0, transport: 'virtual', backupmx: 0, active: 1, created: date, modified: date, password_expiry: 0, in_cloudflare: 0 },
    { domain: '000000032.xyz', description: '000000032.xyz', aliases: 0, mailboxes: 0, maxquota: 0, quota: 0, transport: 'virtual', backupmx: 0, active: 1, created: date, modified: date, password_expiry: 0, in_cloudflare: 0 },
    { domain: '000000033.xyz', description: '000000033.xyz', aliases: 0, mailboxes: 0, maxquota: 0, quota: 0, transport: 'virtual', backupmx: 0, active: 1, created: date, modified: date, password_expiry: 0, in_cloudflare: 0 },
    { domain: '000000034.xyz', description: '000000034.xyz', aliases: 0, mailboxes: 0, maxquota: 0, quota: 0, transport: 'virtual', backupmx: 0, active: 1, created: date, modified: date, password_expiry: 0, in_cloudflare: 0 },
    { domain: '000000035.xyz', description: '000000035.xyz', aliases: 0, mailboxes: 0, maxquota: 0, quota: 0, transport: 'virtual', backupmx: 0, active: 1, created: date, modified: date, password_expiry: 0, in_cloudflare: 0 },
    { domain: '000000036.xyz', description: '000000036.xyz', aliases: 0, mailboxes: 0, maxquota: 0, quota: 0, transport: 'virtual', backupmx: 0, active: 1, created: date, modified: date, password_expiry: 0, in_cloudflare: 0 },
    { domain: '20is20butimnotgay.com', description: '20is20butimnotgay.com', aliases: 0, mailboxes: 0, maxquota: 0, quota: 0, transport: 'virtual', backupmx: 0, active: 1, created: date, modified: date, password_expiry: 0, in_cloudflare: 0 },
    { domain: '20is20butimnotgay.fyi', description: '20is20butimnotgay.fyi', aliases: 0, mailboxes: 0, maxquota: 0, quota: 0, transport: 'virtual', backupmx: 0, active: 1, created: date, modified: date, password_expiry: 0, in_cloudflare: 0 },
    { domain: '20is20butimnotgay.top', description: '20is20butimnotgay.top', aliases: 0, mailboxes: 0, maxquota: 0, quota: 0, transport: 'virtual', backupmx: 0, active: 1, created: date, modified: date, password_expiry: 0, in_cloudflare: 0 },
    { domain: '2weekmail.fyi', description: '2weekmail.fyi', aliases: 0, mailboxes: 0, maxquota: 0, quota: 0, transport: 'virtual', backupmx: 0, active: 1, created: date, modified: date, password_expiry: 0, in_cloudflare: 0 },
    { domain: 'bigwhitevanfbi.com', description: 'bigwhitevanfbi.com', aliases: 0, mailboxes: 0, maxquota: 0, quota: 0, transport: 'virtual', backupmx: 0, active: 1, created: date, modified: date, password_expiry: 0, in_cloudflare: 0 },
    { domain: 'bigwhitevanfbi.fyi', description: 'bigwhitevanfbi.fyi', aliases: 0, mailboxes: 0, maxquota: 0, quota: 0, transport: 'virtual', backupmx: 0, active: 1, created: date, modified: date, password_expiry: 0, in_cloudflare: 0 },
    { domain: 'bigwhitevanfbi.top', description: 'bigwhitevanfbi.top', aliases: 0, mailboxes: 0, maxquota: 0, quota: 0, transport: 'virtual', backupmx: 0, active: 1, created: date, modified: date, password_expiry: 0, in_cloudflare: 0 },
    { domain: 'icantreadpls.fyi', description: 'icantreadpls.fyi', aliases: 0, mailboxes: 0, maxquota: 0, quota: 0, transport: 'virtual', backupmx: 0, active: 1, created: date, modified: date, password_expiry: 0, in_cloudflare: 0 },
    { domain: 'icantreadpls.top', description: 'icantreadpls.top', aliases: 0, mailboxes: 0, maxquota: 0, quota: 0, transport: 'virtual', backupmx: 0, active: 1, created: date, modified: date, password_expiry: 0, in_cloudflare: 0 },
    { domain: 'idonthaveabig.wang', description: 'idonthaveabig.wang', aliases: 0, mailboxes: 0, maxquota: 0, quota: 0, transport: 'virtual', backupmx: 0, active: 1, created: date, modified: date, password_expiry: 0, in_cloudflare: 0 },
    { domain: 'idonthaveabigwang.com', description: 'idonthaveabigwang.com', aliases: 0, mailboxes: 0, maxquota: 0, quota: 0, transport: 'virtual', backupmx: 0, active: 1, created: date, modified: date, password_expiry: 0, in_cloudflare: 0 },
  ];

  await knex('domain').insert(domains);
};
