24 lines
573 B
PHP
24 lines
573 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
class Order extends Model
|
|
{
|
|
protected $table = 'rcd_orders';
|
|
protected $primaryKey = 'orders_id';
|
|
public $timestamps = false;
|
|
public function customer(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Customer::class, 'customers_id');
|
|
}
|
|
|
|
public function ordersStatusHistory(): HasMany
|
|
{
|
|
return $this->hasMany(OrdersStatusHistory::class, 'orders_id');
|
|
}
|
|
}
|