Files
im/plugin/admin/app/model/Card.php
T
commie c153975eed 7
2026-01-08 05:42:44 +08:00

40 lines
1.0 KiB
PHP
Executable File

<?php
namespace plugin\admin\app\model;
class Card extends \app\model\Card
{
public static function onAfterInsert($row)
{
Hook('card.create',$row);
// $data = [];
// for ($i=0; $i < $row['total']; $i++) {
// array_push($data,[
// 'type' => $row['type'],
// 'category_id' => $row['id'],
// 'account' => \support\Random::uuid(),
// 'password' => '123456',
// 'expires' => $row['expires'],
// 'days' => $row['days'],
// 'is_used' => 0,
// 'use_time' => 0,
// 'status' => 1,
// 'created_at' => time(),
// 'updated_at' => time(),
// ]);
// }
// $Cdkey = new \app\model\Cdkey;
// $Cdkey->saveAll($data);
}
function setExpiresAttr($v="",$row=[]){
return strtotime($v);
}
function build(){
}
}