mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-05-03 08:50:22 -05:00
01093d711c
[ci skip] [skip ci]
62 lines
2.1 KiB
PHP
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);
|
|
}
|
|
}
|