Files
shipping-portal/app/Models/CompanyEmployee.php
T

65 lines
2.0 KiB
PHP

<?php
namespace App\Models;
use Eloquent;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\HasOne;
use Illuminate\Support\Carbon;
use Spatie\Activitylog\Models\Activity;
/**
* Class CompanyEmployee
*
* @package App\Models
* @property CompanyModule company_module_id
* @property User user_id
* @property integer role_id
* @property integer status
* @property string|null $deleted_at
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
* @property-read Collection|Activity[] $activities
* @property-read int|null $activities_count
* @property-read Model|Eloquent $causer
* @property-read Collection|CompanyModule[] $companyModule
* @property-read int|null $company_module_count
* @property-read Model|Eloquent $subject
* @property-read Model|Eloquent $target
* @property-read User|null $user
* @method static Builder|CompanyEmployee newModelQuery()
* @method static Builder|CompanyEmployee newQuery()
* @method static Builder|CompanyEmployee query()
* @method static Builder|CompanyEmployee whereCompanyModuleId($value)
* @method static Builder|CompanyEmployee whereCreatedAt($value)
* @method static Builder|CompanyEmployee whereDeletedAt($value)
* @method static Builder|CompanyEmployee whereRoleId($value)
* @method static Builder|CompanyEmployee whereStatus($value)
* @method static Builder|CompanyEmployee whereUpdatedAt($value)
* @method static Builder|CompanyEmployee whereUserId($value)
* @mixin Eloquent
*/
class CompanyEmployee extends AbstractModel
{
protected $table = 'company_employees';
/**
* @return HasMany
*/
public function companyModule(): HasMany
{
return $this->HasMany(CompanyModule::class, 'company_module_id', 'id');
}
/**
* @return HasOne
**/
public function user(): HasOne
{
return $this->hasOne(User::class, 'user_id', 'id');
}
}