You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
470 B
29 lines
470 B
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
class Area extends SoftDeletesModel
|
|
{
|
|
protected $table = "area";
|
|
|
|
public function building()
|
|
{
|
|
return $this->belongsTo(Building::class);
|
|
}
|
|
|
|
public function rooms()
|
|
{
|
|
return $this->hasMany(Room::class);
|
|
}
|
|
|
|
public function beds()
|
|
{
|
|
return $this->hasMany(Bed::class);
|
|
}
|
|
|
|
public function project()
|
|
{
|
|
return $this->hasOne(Project::class,'id','project_id');
|
|
}
|
|
}
|