2020-02-18 11:35:20 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Faker\Generator as Faker;
|
|
|
|
|
2021-12-24 01:14:01 +00:00
|
|
|
$factory->define(App\Models\Product\Broadband::class, function (Faker $faker) {
|
2020-02-18 11:35:20 +00:00
|
|
|
return [
|
|
|
|
'id'=>1,
|
|
|
|
'contract_term'=>12,
|
|
|
|
];
|
|
|
|
});
|
|
|
|
|
2021-12-24 01:14:01 +00:00
|
|
|
$factory->afterMaking(App\Models\Product\Broadband::class, function ($adsl,$faker) {
|
|
|
|
$product = factory(App\Models\Supplier\Broadband::class)->make();
|
2020-02-18 11:35:20 +00:00
|
|
|
$adsl->setRelation('product',$product);
|
|
|
|
$adsl->adsl_supplier_plan_id = $product->id;
|
|
|
|
});
|
|
|
|
|
2021-12-24 01:14:01 +00:00
|
|
|
$factory->state(App\Models\Product\Broadband::class,'unlimit',[
|
2020-02-18 11:35:20 +00:00
|
|
|
'base_down_peak'=>NULL,
|
|
|
|
'base_up_peak'=>NULL,
|
|
|
|
'base_down_offpeak'=>NULL,
|
|
|
|
'base_up_offpeak'=>NULL,
|
|
|
|
'extra_charged'=>NULL,
|
|
|
|
'extra_shaped'=>NULL,
|
|
|
|
'extra_down_peak'=>NULL,
|
|
|
|
'extra_up_peak'=>NULL,
|
|
|
|
'extra_down_offpeak'=>NULL,
|
|
|
|
'extra_up_offpeak'=>NULL,
|
|
|
|
'metric'=>1,
|
|
|
|
]);
|
|
|
|
|
2021-12-24 01:14:01 +00:00
|
|
|
$factory->state(App\Models\Product\Broadband::class,'140/0/0/0',[
|
2020-02-18 11:35:20 +00:00
|
|
|
'base_down_peak'=>140,
|
|
|
|
'base_up_peak'=>0,
|
|
|
|
'base_down_offpeak'=>0,
|
|
|
|
'base_up_offpeak'=>0,
|
|
|
|
'extra_charged'=>NULL,
|
|
|
|
'extra_shaped'=>NULL,
|
|
|
|
'extra_down_peak'=>1,
|
|
|
|
'extra_up_peak'=>NULL,
|
|
|
|
'extra_down_offpeak'=>NULL,
|
|
|
|
'extra_up_offpeak'=>NULL,
|
|
|
|
'metric'=>1,
|
|
|
|
]);
|
|
|
|
|
2021-12-24 01:14:01 +00:00
|
|
|
$factory->state(App\Models\Product\Broadband::class,'70/-/0/-',[
|
2020-02-18 11:35:20 +00:00
|
|
|
'base_down_peak'=>70,
|
|
|
|
'base_up_peak'=>NULL,
|
|
|
|
'base_down_offpeak'=>0,
|
|
|
|
'base_up_offpeak'=>NULL,
|
|
|
|
'extra_charged'=>NULL,
|
|
|
|
'extra_shaped'=>NULL,
|
|
|
|
'extra_down_peak'=>1,
|
|
|
|
'extra_up_peak'=>NULL,
|
|
|
|
'extra_down_offpeak'=>NULL,
|
|
|
|
'extra_up_offpeak'=>NULL,
|
|
|
|
'metric'=>1,
|
|
|
|
]);
|
|
|
|
|
2021-12-24 01:14:01 +00:00
|
|
|
$factory->state(App\Models\Product\Broadband::class,'100/0/40/0',[
|
2020-02-18 11:35:20 +00:00
|
|
|
'base_down_peak'=>100,
|
|
|
|
'base_up_peak'=>0,
|
|
|
|
'base_down_offpeak'=>40,
|
|
|
|
'base_up_offpeak'=>0,
|
|
|
|
'extra_charged'=>NULL,
|
|
|
|
'extra_shaped'=>NULL,
|
|
|
|
'extra_down_peak'=>0,
|
|
|
|
'extra_up_peak'=>NULL,
|
|
|
|
'extra_down_offpeak'=>0,
|
|
|
|
'extra_up_offpeak'=>NULL,
|
|
|
|
'metric'=>1,
|
|
|
|
]);
|
|
|
|
|
2021-12-24 01:14:01 +00:00
|
|
|
$factory->state(App\Models\Product\Broadband::class,'50/-/20/-',[
|
2020-02-18 11:35:20 +00:00
|
|
|
'base_down_peak'=>50,
|
|
|
|
'base_up_peak'=>NULL,
|
|
|
|
'base_down_offpeak'=>20,
|
|
|
|
'base_up_offpeak'=>NULL,
|
|
|
|
'extra_charged'=>NULL,
|
|
|
|
'extra_shaped'=>NULL,
|
|
|
|
'extra_down_peak'=>0,
|
|
|
|
'extra_up_peak'=>NULL,
|
|
|
|
'extra_down_offpeak'=>0,
|
|
|
|
'extra_up_offpeak'=>NULL,
|
|
|
|
'metric'=>1,
|
|
|
|
]);
|