OrderRefundModel.php 577 字节
<?php
/**
 * Created by PhpStorm.
 * User: 29925
 * Date: 2018/8/21
 * Time: 9:49
 */

namespace app\portal\model;

use think\Model;

class OrderRefundModel extends Model
{

    protected $autoWriteTimestamp = true;

    /**
     * 添加退款
     */
    public function addRefund($data) {
        $this->allowField(true)->data($data,true)->isUpdate(false)->save();
        return $this;
    }

    /**
     * 编辑退款
     */
    public function editRefund($data) {
        $this->allowField(true)->data($data,true)->isUpdate(true)->save();
        return $this;
    }
}