coupon-admin/app/model/CouponMain.php

26 lines
577 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 CouponMain
* @package app\model
*/
class CouponMain extends Base
{
const status_on = 0;//进行中
const status_off = 1;//停止
const on_shelf_on = 0;//上架状态
const on_shelf_off = 1;//下架状态
public function business()
{
return $this->hasOne(Business::class, 'code',"business_code");
}
}