37 lines
761 B
PHP
37 lines
761 B
PHP
<?php
|
|
|
|
namespace App\Model;
|
|
|
|
use App\Model\Customer\Customer;
|
|
use App\Model\Traits\TableTrait;
|
|
use Dcat\Admin\Models\Administrator;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class OrderFake extends BaseModel
|
|
{
|
|
use TableTrait;
|
|
|
|
protected $table = 'order_fake';
|
|
protected $guarded = [];
|
|
|
|
public function customer()
|
|
{
|
|
return $this->belongsTo(Customer::class, 'customer_id', 'id');
|
|
}
|
|
|
|
public function order()
|
|
{
|
|
return $this->belongsTo(Order::class, 'order_sn', 'order_sn');
|
|
}
|
|
|
|
public function creator()
|
|
{
|
|
return $this->belongsTo(Administrator::class, 'created_by', 'id');
|
|
}
|
|
|
|
public function updater()
|
|
{
|
|
return $this->belongsTo(Administrator::class, 'updated_by', 'id');
|
|
}
|
|
}
|