12345678910111213141516171819202122232425262728 |
- <?php
- namespace app\common\model;
- use think\Model;
- /**
- * @property Orders orders
- */
- class OrderVoucher extends Model
- {
- protected $autoWriteTimestamp=true;
- public function orders(){
- return $this->belongsTo(Orders::class,'order_id');
- }
- public function makeAudit($pass){
- $this['status']=$pass;
- if($pass){
- $order=$this->orders;
- if($order->is_wait_pay){
- $order->makePay();
- }
- }
- $this->save();
- }
- }
|