| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- namespace App\Modes;
- use Illuminate\Database\Eloquent\Model;
- /**
- * App\Modes\Frozen
- *
- * @property int $id
- * @property int $uid
- * @method static \Illuminate\Database\Eloquent\Builder|\App\Modes\Frozen whereCreatedAt($value)
- * @method static \Illuminate\Database\Eloquent\Builder|\App\Modes\Frozen whereId($value)
- * @method static \Illuminate\Database\Eloquent\Builder|\App\Modes\Frozen whereFrozenTime($value)
- * @method static \Illuminate\Database\Eloquent\Builder|\App\Modes\Frozen whereThawTime($value)
- * @method static \Illuminate\Database\Eloquent\Builder|\App\Modes\Frozen whereUid($value)
- * @mixin \Eloquent
- * @property string $content 分类名称
- * @property int $type 1-实体 2-虚拟
- */
- class Frozen extends Model
- {
- protected $table = 'frozen';
- public static function getUserFrozentimeList($uid,$start,$end){
- $list=Frozen::whereUid($uid)->get();
- $arr=[];
- $kkk=0;
- if(!empty($list)){
- foreach($list as $k=>$item){
- if($item->frozen_time>$start && (empty($item->thaw_time) || $item->thaw_time<$end)){
- $thawtime=empty(strtotime($item->thaw_time))?date('Y-m-d H:i:s'):$item->thaw_time;
- $arr[$kkk]['startime']=$item->frozen_time;
- $arr[$kkk]['endtime']=$thawtime;
- $kkk++;
- }
- }
- }
- return $arr;
- }
- }
|