Files
UNIT3D-Community-Edition/app/Models/Option.php
T
HDVinnie 01093d711c Apply fixes from StyleCI
[ci skip] [skip ci]
2020-07-28 16:54:24 +00:00

62 lines
2.1 KiB
PHP

<?php
/**
* NOTICE OF LICENSE.
*
* UNIT3D Community Edition is open-sourced software licensed under the GNU Affero General Public License v3.0
* The details is bundled with this project in the file LICENSE.txt.
*
* @project UNIT3D Community Edition
*
* @author HDVinnie <hdinnovations@protonmail.com>
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
*/
namespace App\Models;
use App\Traits\Auditable;
use Illuminate\Database\Eloquent\Model;
/**
* App\Models\Option.
*
* @property int $id
* @property int $poll_id
* @property string $name
* @property int $votes
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \App\Models\Poll $poll
*
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Option newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Option newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Option query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Option whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Option whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Option whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Option wherePollId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Option whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Option whereVotes($value)
* @mixin \Eloquent
*/
class Option extends Model
{
use Auditable;
/*** The Attributes That Are Mass Assignable.
*
* @var array
*/
protected $fillable = [
'name',
];
/*** Belongs To A Poll.
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function poll()
{
return $this->belongsTo(Poll::class);
}
}