Files
water-back/app/Models/AreaCode.php
2023-01-11 16:54:44 +08:00

37 lines
703 B
PHP

<?php
namespace App\Models;
use App\Models\Traits\BelongsToArea;
use App\Traits\HasStatus;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Modules\User\Models\User;
use Modules\User\Traits\BelongsToUser;
class AreaCode extends Model
{
use BelongsToArea, BelongsToUser, HasStatus;
const STATUS_INIT = 0;
const STATUS_USED = 1;
const STATUS = [
self::STATUS_INIT => '未使用',
self::STATUS_USED => '已使用',
];
/**
* Notes: 生成人-管理人
*
* @Author: 玄尘
* @Date: 2023/1/11 13:41
* @return BelongsTo
*/
public function manage(): BelongsTo
{
return $this->belongsTo(User::class);
}
}