<?php

namespace app\model;

use think\Db;
use think\Model;

/**
 * Created by PhpStorm.
 * User : zw
 * Date : 2018/2/1
 * Time : 14:44
 * Intro:
 */
class OPayLogModel extends Model
{
    protected $table = "o_paylog";
    private $db_;

    function __construct()
    {
        $this->db_ = Db::name($this->table);
    }

    public function addPayLog($params)
    {
        Db::startTrans();
        try {
            $this->db->inserAll($params);
            Db::commit();
            return 1;
        } catch (\Exception $e) {
            Db::rollback();
            return 0;
        }

    }
}