30 lines
586 B
PHP
30 lines
586 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Models;
|
||
|
|
||
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
||
|
use App\Traits\OrderServiceOptions;
|
||
|
|
||
|
class AdslPlan extends Model
|
||
|
{
|
||
|
use OrderServiceOptions;
|
||
|
|
||
|
protected $table = 'ab_adsl_plan';
|
||
|
|
||
|
protected $order_attributes = [
|
||
|
'options.address'=>[
|
||
|
'request'=>'options.address',
|
||
|
'key'=>'service_address',
|
||
|
'validation'=>'required|string:10',
|
||
|
'validation_message'=>'Address is a required field.',
|
||
|
],
|
||
|
];
|
||
|
|
||
|
protected $order_model = ServiceAdsl::class;
|
||
|
|
||
|
public function product()
|
||
|
{
|
||
|
return $this->hasOne(AdslSupplierPlan::class,'id','adsl_supplier_plan_id');
|
||
|
}
|
||
|
}
|