You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
687 B

5 days ago
<?php
namespace App\Models;
class CompanyQccAccount extends CommonModel
{
public const STATUS_SELECTED = 'selected';
public const STATUS_OCCUPIED = 'occupied';
public const STATUS_UNKNOWN = 'unknown';
protected $casts = [
'selected_at' => 'datetime:Y-m-d H:i:s',
'first_success_at' => 'datetime:Y-m-d H:i:s',
'created_at' => 'datetime:Y-m-d H:i:s',
'updated_at' => 'datetime:Y-m-d H:i:s',
];
public function company()
{
return $this->belongsTo(Company::class);
}
public function isCallable(): bool
{
return in_array($this->status, [self::STATUS_SELECTED, self::STATUS_OCCUPIED], true);
}
}