Add new models and page for motions
This commit is contained in:
31
app/Models/Planering.php
Normal file
31
app/Models/Planering.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Planering extends Model
|
||||
{
|
||||
protected $table = 'planering';
|
||||
protected $primaryKey = 'nyckel';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'datum' => 'datetime',
|
||||
'publicerad' => 'datetime',
|
||||
'uppdaterad' => 'datetime',
|
||||
'wn_expires' => 'datetime',
|
||||
'timestamp' => 'datetime',
|
||||
'slutdatum' => 'datetime',
|
||||
'webbtvlive' => 'boolean',
|
||||
];
|
||||
|
||||
public function person()
|
||||
{
|
||||
return $this->belongsTo(Person::class, 'intressent_id', 'intressent_id');
|
||||
}
|
||||
|
||||
public function mottagare()
|
||||
{
|
||||
return $this->belongsTo(Person::class, 'mottagare_id', 'intressent_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user