[api] reward + thanks

This commit is contained in:
xiaomlove
2022-03-30 15:37:11 +08:00
parent b613a46b8d
commit 3e4a5766c4
38 changed files with 983 additions and 64 deletions

22
app/Models/PollAnswer.php Normal file
View File

@@ -0,0 +1,22 @@
<?php
namespace App\Models;
class PollAnswer extends NexusModel
{
protected $table = 'pollanswers';
protected $fillable = ['pollid', 'userid', 'selection',];
public function poll()
{
return $this->belongsTo(Poll::class, 'pollid');
}
public function user()
{
return $this->belongsTo(User::class, 'userid');
}
}