Files
fdesk/app/common/logic/MessageNotificationsLogic.php
T

29 lines
606 B
PHP
Raw Normal View History

2025-08-20 18:12:07 +08:00
<?php
namespace app\common\logic;
use app\common\traits\crud\CrudLogicTrait;
use app\common\model\MessageNotifications;
class MessageNotificationsLogic
{
use CrudLogicTrait;
/**
* 指定当前要操作的模型
*/
protected string $modelClass = MessageNotifications::class;
2025-08-21 15:47:05 +08:00
public function logicDeleteBy($config)
{
$msg = $this->logicShow($config);
if ($msg) {
// 删除关联的用户状态记录
$msg->userStatuses()->delete();
// 删除消息本身
$msg->delete();
}
return true;
}
2025-08-20 18:12:07 +08:00
}