| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php
- /**
- *
- * @copyright ©2020 点小铺
- * @author hanj
- * @link: https://dyuit.com
- * Created by VSCode
- */
- 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);
- }
- }
|