coupon-admin/app/model/Business.php

24 lines
475 B
PHP
Raw Normal View History

2021-11-18 09:57:04 +00:00
<?php
namespace app\model;
class Business extends Base
{
const state_reviewing = 0;
const state_on = 1;
const state_off = 2;
2021-11-30 10:31:58 +00:00
2021-11-24 06:41:24 +00:00
public function category()
{
return $this->hasOne(Category::class, 'id',"type");
}
2021-11-30 10:31:58 +00:00
public function account()
{
return $this->hasOne(Account::class, 'business_code',"code");
}
2021-12-01 08:53:44 +00:00
public function agency()
{
return $this->hasOne(self::class,"code","agency_code");
}
2021-11-18 09:57:04 +00:00
}