mirror of
https://gitee.com/wonderful-code/buildadmin
synced 2024-11-22 23:28:43 +00:00
23 lines
430 B
PHP
23 lines
430 B
PHP
<?php
|
|
|
|
namespace app\admin\model;
|
|
|
|
use think\model;
|
|
|
|
/**
|
|
* UserRule 模型
|
|
* @controllerUrl 'userRule'
|
|
*/
|
|
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]]);
|
|
}
|
|
} |