mirror of
https://gitee.com/wonderful-code/buildadmin
synced 2024-11-22 23:28:43 +00:00
19 lines
374 B
PHP
19 lines
374 B
PHP
|
<?php
|
||
|
|
||
|
namespace app\admin\model;
|
||
|
|
||
|
use think\model;
|
||
|
|
||
|
class UserRule extends model
|
||
|
{
|
||
|
protected $autoWriteTimestamp = 'int';
|
||
|
|
||
|
protected $createTime = 'createtime';
|
||
|
protected $updateTime = 'updatetime';
|
||
|
|
||
|
protected static function onAfterInsert($row)
|
||
|
{
|
||
|
$pk = $row->getPk();
|
||
|
$row->where($pk, $row[$pk])->update(['weigh' => $row[$pk]]);
|
||
|
}
|
||
|
}
|