阶段更新
This commit is contained in:
@@ -16,10 +16,11 @@ class AreaCode extends Model
|
||||
const STATUS_USED = 1;
|
||||
|
||||
const STATUS = [
|
||||
self::STATUS_INIT => '未使用',
|
||||
self::STATUS_USED => '已使用',
|
||||
self::STATUS_INIT => '未提取',
|
||||
self::STATUS_USED => '已提取',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* Notes: 生成人-管理人
|
||||
*
|
||||
@@ -32,5 +33,17 @@ class AreaCode extends Model
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Notes: 设置使用
|
||||
*
|
||||
* @Author: 玄尘
|
||||
* @Date: 2023/1/12 14:25
|
||||
*/
|
||||
public function used()
|
||||
{
|
||||
$this->status = self::STATUS_USED;
|
||||
$this->save();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user