love_php/app/Models/RankHistory.php

31 lines
675 B
PHP
Raw Permalink Normal View History

2026-04-02 09:20:51 +08:00
<?php
namespace App\Models;
use App\Models\Base;
use Illuminate\Database\Eloquent\Model;
class RankHistory extends Base
{
protected $fillable = [];
protected $guarded = [];
public const SIGNNEWYEAR="sign_year";//元旦签到
public const SUPPORTHENAN='support_henan';//支援河南
public const TOPICACTIVITIESPARTGIVE ="topic_activities";//话题参与赠送会员
public function user()
{
return $this->belongsTo(User::class);
}
public function rank()
{
return $this->hasOne(Rank::class, 'id', 'rank_id');
}
public function scopeType($query, $type)
{
return $query->where('type', $type);
}
}