mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-03 14:10:57 +08:00
27 lines
443 B
PHP
27 lines
443 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
use App\Models\Traits\NexusActivityLogTrait;
|
|
|
|
class PollAnswer extends NexusModel
|
|
{
|
|
use NexusActivityLogTrait;
|
|
|
|
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');
|
|
}
|
|
|
|
}
|