30 lines
		
	
	
		
			610 B
		
	
	
	
		
			PHP
		
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			610 B
		
	
	
	
		
			PHP
		
	
	
<?php
 | 
						|
 | 
						|
namespace app\model;
 | 
						|
 | 
						|
use think\Collection;
 | 
						|
use think\db\exception\DataNotFoundException;
 | 
						|
use think\db\exception\DbException;
 | 
						|
use think\db\exception\ModelNotFoundException;
 | 
						|
 | 
						|
/**
 | 
						|
 * 扣费记录
 | 
						|
 * Class Deduction
 | 
						|
 * @package app\model
 | 
						|
 */
 | 
						|
class Deduction extends Base
 | 
						|
{
 | 
						|
 | 
						|
    public function couponMain()
 | 
						|
    {
 | 
						|
        return $this->hasOne(CouponMain::class,"id","coupon_main_id");
 | 
						|
    }
 | 
						|
    public function bill()
 | 
						|
    {
 | 
						|
        return $this->hasOne(CouponBill::class,"id","bill_id");
 | 
						|
    }
 | 
						|
    public function account()
 | 
						|
    {
 | 
						|
        return $this->hasOne(Account::class,"user_code","user_code");
 | 
						|
    }
 | 
						|
} |