OrderSortModel.php 581 字节
<?php
/**
 * Created by PhpStorm.
 * User: 29925
 * Date: 2018/8/7
 * Time: 16:16
 */

namespace app\admin\model;

use think\Model;

class OrderSortModel extends Model
{
    protected $autoWriteTimestamp = true;

    /**
     * 添加表单类型
     */
    public function addSort($data) {
        $this->allowField(true)->data($data,true)->isUpdate(false)->save();
        return $this;
    }

    /**
     * 编辑表单类型
     */
    public function editSort($data) {
        $this->allowField(true)->data($data,true)->isUpdate(true)->save();
        return $this;
    }
}