mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 20:44:19 +00:00
70 lines
2.2 KiB
PHP
70 lines
2.2 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Builder;
|
|
use Illuminate\Database\Eloquent\Collection;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
use Illuminate\Database\Eloquent\Relations\MorphTo;
|
|
use Illuminate\Support\Carbon;
|
|
use Spatie\Activitylog\Models\Activity;
|
|
|
|
/**
|
|
* Class Contact
|
|
*
|
|
* @package App\Models
|
|
* @property int owner_id
|
|
* @property string owner_type
|
|
* @property string reference
|
|
* @property string phone
|
|
* @property string email
|
|
* @property string wechat_id
|
|
* @property int default
|
|
* @property int $id
|
|
* @property Carbon|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 Model|\Eloquent $owner
|
|
* @property-read Model|\Eloquent $subject
|
|
* @property-read Model|\Eloquent $target
|
|
* @method static Builder|Contact newModelQuery()
|
|
* @method static Builder|Contact newQuery()
|
|
* @method static \Illuminate\Database\Query\Builder|Contact onlyTrashed()
|
|
* @method static Builder|Contact query()
|
|
* @method static Builder|Contact whereCreatedAt($value)
|
|
* @method static Builder|Contact whereDefault($value)
|
|
* @method static Builder|Contact whereDeletedAt($value)
|
|
* @method static Builder|Contact whereEmail($value)
|
|
* @method static Builder|Contact whereId($value)
|
|
* @method static Builder|Contact whereOwnerId($value)
|
|
* @method static Builder|Contact whereOwnerType($value)
|
|
* @method static Builder|Contact wherePhone($value)
|
|
* @method static Builder|Contact whereReference($value)
|
|
* @method static Builder|Contact whereUpdatedAt($value)
|
|
* @method static Builder|Contact whereWechatId($value)
|
|
* @method static \Illuminate\Database\Query\Builder|Contact withTrashed()
|
|
* @method static \Illuminate\Database\Query\Builder|Contact withoutTrashed()
|
|
* @mixin \Eloquent
|
|
*/
|
|
class Contact extends AbstractModel
|
|
{
|
|
use SoftDeletes;
|
|
|
|
protected $table = 'contacts';
|
|
|
|
protected $dates = ['deleted_at'];
|
|
|
|
/**
|
|
* @return \Illuminate\Database\Eloquent\Relations\MorphTo
|
|
*/
|
|
public function owner(): morphTo
|
|
{
|
|
return $this->morphTo();
|
|
}
|
|
|
|
}
|