123456789101112131415161718192021222324252627282930313233 |
- <?php
- namespace app\common\model;
- use think\Model;
- class UserExchsoundLog extends Model
- {
-
- protected $autoWriteTimestamp = 'int';
-
- protected $createTime = 'createtime';
-
- public function addExchsoundLog($user_id,$sound,$money) {
- if(!$user_id || !$sound || !$money) {
- return false;
- }
- $data = [
- "user_id" => $user_id,
- "sound_coin" => $sound,
- "jewel" => $money,
- "createtime" => time()
- ];
- return $this->insertGetId($data);
- }
- }
|