Add new models and page for motions
This commit is contained in:
102
app/Models/Dokument.php
Normal file
102
app/Models/Dokument.php
Normal file
@@ -0,0 +1,102 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Dokument extends Model
|
||||
{
|
||||
protected $table = 'dokument';
|
||||
|
||||
protected $primaryKey = 'hangar_id';
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'hangar_id',
|
||||
'dok_id',
|
||||
'rm',
|
||||
'beteckning',
|
||||
'typ',
|
||||
'subtyp',
|
||||
'doktyp',
|
||||
'typrubrik',
|
||||
'dokumentnamn',
|
||||
'debattnamn',
|
||||
'tempbeteckning',
|
||||
'organ',
|
||||
'mottagare',
|
||||
'nummer',
|
||||
'slutnummer',
|
||||
'datum',
|
||||
'systemdatum',
|
||||
'publicerad',
|
||||
'titel',
|
||||
'subtitel',
|
||||
'status',
|
||||
'htmlformat',
|
||||
'relaterat_id',
|
||||
'source',
|
||||
'sourceid',
|
||||
'dokument_url_text',
|
||||
'dokument_url_html',
|
||||
'dokumentstatus_url_xml',
|
||||
'utskottsforslag_url_xml',
|
||||
'html',
|
||||
];
|
||||
|
||||
public function utskottsforslag()
|
||||
{
|
||||
return $this->hasMany(DokUtskottsforslag::class, 'hangar_id', 'hangar_id');
|
||||
}
|
||||
|
||||
public function motforslag()
|
||||
{
|
||||
return $this->hasMany(DokMotforslag::class, 'hangar_id', 'hangar_id');
|
||||
}
|
||||
|
||||
public function aktiviteter()
|
||||
{
|
||||
return $this->hasMany(DokAktivitet::class, 'hangar_id', 'hangar_id');
|
||||
}
|
||||
|
||||
public function intressenter()
|
||||
{
|
||||
return $this->hasMany(DokIntressent::class, 'hangar_id', 'hangar_id');
|
||||
}
|
||||
|
||||
public function forslag()
|
||||
{
|
||||
return $this->hasMany(DokForslag::class, 'hangar_id', 'hangar_id');
|
||||
}
|
||||
|
||||
public function uppgifter()
|
||||
{
|
||||
return $this->hasMany(DokUppgift::class, 'hangar_id', 'hangar_id');
|
||||
}
|
||||
|
||||
public function bilagor()
|
||||
{
|
||||
return $this->hasMany(DokBilaga::class, 'hangar_id', 'hangar_id');
|
||||
}
|
||||
|
||||
public function referenser()
|
||||
{
|
||||
return $this->hasMany(DokReferens::class, 'hangar_id', 'hangar_id');
|
||||
}
|
||||
|
||||
public function debatter()
|
||||
{
|
||||
return $this->hasMany(Debatt::class, 'hangar_id', 'hangar_id');
|
||||
}
|
||||
|
||||
public function voteringar()
|
||||
{
|
||||
return $this->hasMany(Votering::class, 'hangar_id', 'hangar_id');
|
||||
}
|
||||
|
||||
public function anforanden()
|
||||
{
|
||||
return $this->hasMany(Anforande::class, 'dok_hangar_id', 'hangar_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user