(Add) UserEcho Model

For user tabs in chat.
This commit is contained in:
singularity43
2019-02-09 15:05:44 -05:00
parent 64fb38c539
commit e408c69e62
+73
View File
@@ -0,0 +1,73 @@
<?php
/**
* NOTICE OF LICENSE.
*
* UNIT3D is open-sourced software licensed under the GNU 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 singularity43
*/
namespace App;
use Illuminate\Database\Eloquent\Model;
class UserEcho extends Model
{
/**
* Indicates If The Model Should Be Timestamped.
*
* @var bool
*/
public $timestamps = true;
/**
* The Database Table Used By The Model.
*
* @var string
*/
protected $table = 'user_echoes';
/**
* Belongs To A User.
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function user()
{
return $this->belongsTo(User::class);
}
/**
* Belongs To A Chatroom.
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function room()
{
return $this->belongsTo(Chatroom::class);
}
/**
* Belongs To A Target.
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function target()
{
return $this->belongsTo(User::class);
}
/**
* Belongs To A Bot.
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function bot()
{
return $this->belongsTo(Bot::class);
}
}