46 lines
990 B
PHP
46 lines
990 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
use Illuminate\Support\Carbon;
|
|
|
|
/**
|
|
* @property int $ID_Suggestion
|
|
* @property int $ID_Utilisateur
|
|
* @property string $Type
|
|
* @property string $Titre
|
|
* @property string $Description
|
|
* @property int|null $GiteaIssueNumber
|
|
* @property int $CommentairesVus
|
|
* @property Carbon $DateCreation
|
|
*/
|
|
class Suggestion extends Model
|
|
{
|
|
protected $table = 'suggestions';
|
|
|
|
protected $primaryKey = 'ID_Suggestion';
|
|
|
|
public $timestamps = false;
|
|
|
|
protected $fillable = [
|
|
'ID_Utilisateur',
|
|
'Type',
|
|
'Titre',
|
|
'Description',
|
|
'GiteaIssueNumber',
|
|
'CommentairesVus',
|
|
'DateCreation',
|
|
];
|
|
|
|
protected $casts = [
|
|
'DateCreation' => 'datetime',
|
|
];
|
|
|
|
public function utilisateur(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Utilisateur::class, 'ID_Utilisateur', 'ID_Utilisateur');
|
|
}
|
|
}
|