[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
+21
View File
@@ -0,0 +1,21 @@
<?php
namespace App\Models;
class Poll extends NexusModel
{
protected $fillable = ['added', 'question', 'option0', 'option1', 'option2', 'option3', 'option4', 'option5'];
protected $casts = [
'added' => 'datetime'
];
const MAX_OPTION_INDEX = 19;
public function answers()
{
return $this->hasMany(PollAnswer::class, 'pollid');
}
}