1
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
<?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(){
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user