This repository has been archived on 2024-07-11. You can view files and clone it, but cannot push or open issues or pull requests.
yoshop/source/application/common/model/sharp/Active.php
2020-04-25 22:20:29 +08:00

38 lines
761 B
PHP

<?php
namespace app\common\model\sharp;
use app\common\model\BaseModel;
/**
* 整点秒杀-活动会场模型
* Class Active
* @package app\common\model\sharp
*/
class Active extends BaseModel
{
protected $name = 'sharp_active';
/**
* 关联活动场次表
* @return \think\model\relation\HasMany
*/
public function activeTime()
{
return $this->hasMany('ActiveTime', 'active_id')
->order(['active_time' => 'asc']);
}
/**
* 活动会场详情
* @param $activeId
* @param array $with
* @return static|null
* @throws \think\exception\DbException
*/
public static function detail($activeId, $with = [])
{
return static::get($activeId, $with);
}
}