35 lines
802 B
PHP
35 lines
802 B
PHP
<?php
|
|
|
|
namespace App\Models\Deal;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Contract extends Model
|
|
{
|
|
use HasFactory;
|
|
const CREATED_AT = 'created_at';
|
|
const UPDATED_AT = 'updated_at';
|
|
protected $table = 'client_contract';
|
|
protected $fillable = [
|
|
'deal_id',
|
|
'status',
|
|
'comment',
|
|
'price',
|
|
'reward',
|
|
'square',
|
|
'floor',
|
|
|
|
'room',//Номер квартиры
|
|
'date',//дата ДДУ
|
|
'reg_date',//Дата регистрации ДДУ
|
|
'payment_type',//Вид оплаты
|
|
'reward'//Вознаграждение агента
|
|
];
|
|
|
|
public function deal()
|
|
{
|
|
return $this->belongsTo(Deal::class, 'deal_id');
|
|
}
|
|
}
|