阶段更新

This commit is contained in:
2023-01-11 16:54:44 +08:00
parent ff55141a1e
commit 088dd64b2f
28 changed files with 807 additions and 238 deletions

36
app/Models/AreaCode.php Normal file
View 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);
}
}