goodsnotices/app/Models/Notice.php

27 lines
595 B
PHP
Raw Permalink Normal View History

2024-05-24 07:55:55 +00:00
<?php
namespace App\Models;
2024-05-27 09:52:02 +00:00
use App\helpers\apiRequest;
2024-05-27 08:03:31 +00:00
/**
* @property int $notice_id
* @property int $notice_type
* @property string $raw_content
* @property int $state
* @property string $created_at
* @property string $updated_at
*/
2024-05-25 14:06:58 +00:00
class Notice extends Base
2024-05-24 07:55:55 +00:00
{
2024-05-27 09:52:02 +00:00
public static function deleteNotice(int|array $notice_d): bool
{
if (!is_array($notice_d)) {
$notice_d = [$notice_d];
}
$ids = implode(',', $notice_d);
$res = apiRequest::api('/Notic/doNotics', ['notice_ids' => $ids]);
return $res['errCode'] == '0000';
}
2024-05-24 07:55:55 +00:00
}