Work in progress determining user type

This commit is contained in:
Deon George
2018-07-06 16:57:49 +10:00
parent 1ac764f05e
commit 14b568b735
15 changed files with 385 additions and 80 deletions

View File

@@ -14,10 +14,10 @@ class CountryTableSeeder extends Seeder
public function run()
{
$o = new Country;
$o->id = 61;
$o->name = 'Australia';
$o->two_code = 'AU';
$o->three_code = 'AUS';
$o->currency_id = '61';
$o->active = TRUE;
$oo = Currency::where('iso_code','AUD')->firstOrFail();

View File

@@ -14,6 +14,7 @@ class CurrencyTableSeeder extends Seeder
public function run()
{
$o = new Currency;
$o->id = 610;
$o->name = 'Australian Dollars';
$o->symbol = '$';
$o->iso_code = 'AUD';

View File

@@ -11,9 +11,13 @@ class DatabaseSeeder extends Seeder
*/
public function run()
{
$this->call([
CurrencyTableSeeder::class,
CountryTableSeeder::class
]);
$this->call([
CurrencyTableSeeder::class,
CountryTableSeeder::class,
LanguageTableSeeder::class,
SiteTableSeeder::class,
UserTableSeeder::class,
RtmTableSeeder::class,
]);
}
}

View File

@@ -0,0 +1,22 @@
<?php
use Illuminate\Database\Seeder;
use App\Models\Language;
class LanguageTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$o = new Language;
$o->id = 1;
$o->name = 'English';
$o->iso = 'en_EN';
$o->save();
}
}

View File

@@ -0,0 +1,23 @@
<?php
use Illuminate\Database\Seeder;
use App\Models\Rtm;
class RtmTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$o = new Rtm;
$o->id = 1;
$o->site_id = 1;
$o->account_id = 1;
$o->name = 'Wholesaler';
$o->save();
}
}

View File

@@ -0,0 +1,24 @@
<?php
use Illuminate\Database\Seeder;
use App\Models\Site;
class SiteTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$o = new Site;
$o->id = 1;
$o->country_id = 61;
$o->language_id = 1;
$o->currency_id = 610;
$o->url = 'test';
$o->save();
}
}

View File

@@ -0,0 +1,71 @@
<?php
use Illuminate\Database\Seeder;
use App\User;
class UserTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$o = new User;
$o->id = 1;
$o->site_id = 1;
$o->language_id = 1;
$o->country_id = 61;
$o->currency_id = 610;
$o->email = 'wholesaler@example.com';
$o->save();
$o = new User;
$o->id = 10;
$o->site_id = 1;
$o->language_id = 1;
$o->country_id = 61;
$o->currency_id = 610;
$o->email = 'reseller1-0@example.com';
$o->save();
$o = new User;
$o->id = 11;
$o->site_id = 1;
$o->language_id = 1;
$o->country_id = 61;
$o->currency_id = 610;
$o->email = 'reseller2-0@example.com';
$o->save();
$o = new User;
$o->id = 110;
$o->site_id = 1;
$o->language_id = 1;
$o->country_id = 61;
$o->currency_id = 610;
$o->email = 'reseller2-1@example.com';
$o->save();
$o = new User;
$o->id = 1010;
$o->site_id = 1;
$o->language_id = 1;
$o->country_id = 61;
$o->currency_id = 610;
$o->email = 'user1-0-1@example.com';
$o->save();
$o = new User;
$o->id = 1110;
$o->site_id = 1;
$o->language_id = 1;
$o->country_id = 61;
$o->currency_id = 610;
$o->email = 'user2-1-1@example.com';
$o->save();
}
}