coupon-admin/app/model/Deduction.php

30 lines
610 B
PHP
Raw Normal View History

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