mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-03 14:10:57 +08:00
27 lines
577 B
PHP
27 lines
577 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
class Invite extends NexusModel
|
|
{
|
|
protected $table = 'invites';
|
|
|
|
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'] ?? '';
|
|
}
|
|
|
|
}
|