Add new models and page for motions
This commit is contained in:
31
app/Models/DokIntressent.php
Normal file
31
app/Models/DokIntressent.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class DokIntressent extends Model
|
||||
{
|
||||
protected $table = 'dokintressent';
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'hangar_id',
|
||||
'intressent_id',
|
||||
'namn',
|
||||
'partibet',
|
||||
'ordning',
|
||||
'roll',
|
||||
];
|
||||
|
||||
public function dokument()
|
||||
{
|
||||
return $this->belongsTo(Dokument::class, 'hangar_id', 'hangar_id');
|
||||
}
|
||||
|
||||
public function person()
|
||||
{
|
||||
return $this->belongsTo(Person::class, 'intressent_id', 'intressent_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user