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/wxapp/LiveRoom.php

47 lines
851 B
PHP
Raw Normal View History

2020-04-25 22:48:24 +08:00
<?php
namespace app\common\model\wxapp;
use app\common\model\BaseModel;
/**
* 微信小程序直播间模型
* Class LiveRoom
* @package app\common\model\wxapp
*/
class LiveRoom extends BaseModel
{
protected $name = 'wxapp_live_room';
/**
* 获取器: 开播时间
* @param $value
* @return false|string
*/
public function getStartTimeAttr($value)
{
return \format_time($value);
}
/**
* 获取器: 结束时间
* @param $value
* @return false|string
*/
public function getEndTimeAttr($value)
{
return \format_time($value);
}
/**
* 获取直播间详情
2020-08-28 10:35:48 +08:00
* @param int $id
2020-04-25 22:48:24 +08:00
* @return static|null
* @throws \think\exception\DbException
*/
2020-08-28 10:35:48 +08:00
public static function detail($id)
2020-04-25 22:48:24 +08:00
{
2020-08-28 10:35:48 +08:00
return static::get($id);
2020-04-25 22:48:24 +08:00
}
}