|
|
|
@ -8,11 +8,16 @@ use app\api\model\store\Shop; |
|
|
|
|
use app\common\enum\RecoveryStatusEnum; |
|
|
|
|
use app\common\enum\RecoveryTypeEnum; |
|
|
|
|
use cores\BaseModel; |
|
|
|
|
use think\model\concern\SoftDelete; |
|
|
|
|
use think\model\relation\HasMany; |
|
|
|
|
use think\model\relation\HasOne; |
|
|
|
|
|
|
|
|
|
class RecoveryOrder extends BaseModel |
|
|
|
|
{ |
|
|
|
|
use SoftDelete; |
|
|
|
|
|
|
|
|
|
protected $deleteTime = 'delete_time'; |
|
|
|
|
protected $defaultSoftDelete = 0; |
|
|
|
|
// 定义表名 |
|
|
|
|
protected $name = 'server_recovery_order'; |
|
|
|
|
|
|
|
|
@ -82,4 +87,12 @@ class RecoveryOrder extends BaseModel |
|
|
|
|
{ |
|
|
|
|
return $this->hasOne(ServerRecovery::class, 'recovery_id', 'recovery_id'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function remove($orderId): bool |
|
|
|
|
{ |
|
|
|
|
if (static::destroy($orderId)) { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
} |