mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 04:20:49 +08:00
add-filesystem-google-drive
This commit is contained in:
@@ -6,7 +6,21 @@ class Invite extends NexusModel
|
||||
{
|
||||
protected $table = 'invites';
|
||||
|
||||
protected $fillable = [
|
||||
'inviter', 'invitee', 'hash', 'time_invited',
|
||||
const VALID_YES = 1;
|
||||
const VALID_NO = 0;
|
||||
|
||||
public static $validInfo = [
|
||||
self::VALID_NO => ['text' => 'No'],
|
||||
self::VALID_YES => ['text' => 'Yes'],
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'inviter', 'invitee', 'hash', 'time_invited', 'valid', 'invitee_register_uid', 'invitee_register_email', 'invitee_register_username'
|
||||
];
|
||||
|
||||
public function getValidTextAttribute()
|
||||
{
|
||||
return self::$validInfo[$this->valid]['text'] ?? '';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -134,4 +134,9 @@ class User extends Authenticatable
|
||||
return $this->belongsTo(Language::class, 'lang');
|
||||
}
|
||||
|
||||
public function invitee_code()
|
||||
{
|
||||
return $this->hasOne(Invite::class, 'invitee_register_uid');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user