31 lines
675 B
PHP
31 lines
675 B
PHP
<?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);
|
|
}
|
|
}
|