Files
UNIT3D-Community-Edition/app/Models/ChatStatus.php
T
2019-11-11 20:52:59 -05:00

55 lines
1.9 KiB
PHP

<?php
/**
* NOTICE OF LICENSE.
*
* UNIT3D 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
*
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
* @author Poppabear
*/
namespace App\Models;
use App\Traits\Auditable;
use Illuminate\Database\Eloquent\Model;
/**
* App\Models\ChatStatus
*
* @property int $id
* @property string $name
* @property string $color
* @property string|null $icon
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\User[] $users
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ChatStatus newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ChatStatus newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ChatStatus query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ChatStatus whereColor($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ChatStatus whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ChatStatus whereIcon($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ChatStatus whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ChatStatus whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ChatStatus whereUpdatedAt($value)
* @mixin \Eloquent
* @property-read int|null $users_count
*/
class ChatStatus extends Model
{
use Auditable;
/**
* A Status Has Many Users.
*
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function users()
{
return $this->hasMany(User::class, 'chat_status_id', 'id');
}
}