<?php


namespace app\shared\model;

use think\Model as ThinkModel;
//账单
class RechargeOrder extends ThinkModel
{
    // 设置当前模型对应的完整数据表名称
    protected $name = 'shared_recharge_order';
    // 自动写入时间戳
    protected $autoWriteTimestamp = true;

    static public function crateOrderNo($type="Re"){
   		$order_no=$type.date('YmdHis').rand(1000,9999);
   		while (self::where('order_no',$order_no)->count()) {
   			self::crateOrderNo($type);
   		}
   		return $order_no;
   	}
}

