阶段更新
This commit is contained in:
36
app/Models/AreaCode.php
Normal file
36
app/Models/AreaCode.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user