coupon-admin/app/model/Deduction.php

30 lines
610 B
PHP
Raw Normal View History

2021-11-18 09:57:04 +00:00
<?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
{
2021-11-30 10:31:58 +00:00
public function couponMain()
{
return $this->hasOne(CouponMain::class,"id","coupon_main_id");
}
2021-12-20 08:17:54 +00:00
public function bill()
{
2021-12-20 08:19:16 +00:00
return $this->hasOne(CouponBill::class,"id","bill_id");
2021-12-20 08:17:54 +00:00
}
2021-12-20 09:53:03 +00:00
public function account()
{
return $this->hasOne(Account::class,"user_code","user_code");
}
2021-11-18 09:57:04 +00:00
}