<?php

$is_script = 1;
include_once __DIR__ . '/../../index.php';


use app\api\model\ProductAccount;

$account_model = new ProductAccount;
$where = [
    'PackageName' => '测试卡',
    'EndTime' => ['<',date('Y-m-d H:i:s')],
];

$update_data = [
    'DeleteTag' => 1
];

$where_month = [
    'EndTime' => ['<',date("Y-m-d H:i:s", strtotime("-1 week"))]
];

$account_model->updateOne($where,$update_data);
$account_model->updateOne($where_month,$update_data);