inital commit

This commit is contained in:
2024-02-01 09:53:53 +00:00
commit 9743fce12b
19771 changed files with 4230637 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class RandDVoting extends Model
{
protected $table = 'randd_votings';
protected $fillable = [
'project_id',
'description',
'user_id',
'status',
];
/// relation one to many between Project(NewRandD) and Voting
public function project()
{
return $this->belongsTo(NewRandD::class, 'project_id', 'id');
}
/// Relation one to many between user and voting
public function user()
{
return $this->belongsTo(User::class);
}
public function answers()
{
return $this->hasMany(RandDVotingPaperAnswer::class, 'vote_id', 'id');
}
}