Changeset View
Changeset View
Standalone View
Standalone View
src/app/SignupInvitation.php
<?php | <?php | ||||
namespace App; | namespace App; | ||||
use Carbon\Carbon; | use Carbon\Carbon; | ||||
use Illuminate\Database\Eloquent\Model; | use Illuminate\Database\Eloquent\Model; | ||||
use App\Traits\UuidStrKeyTrait; | |||||
/** | /** | ||||
* The eloquent definition of a signup invitation. | * The eloquent definition of a signup invitation. | ||||
* | * | ||||
* @property string $email | * @property string $email | ||||
* @property string $id | * @property string $id | ||||
* @property ?int $tenant_id | * @property ?int $tenant_id | ||||
* @property ?\App\Tenant $tenant | * @property ?\App\Tenant $tenant | ||||
* @property ?\App\User $user | * @property ?\App\User $user | ||||
*/ | */ | ||||
class SignupInvitation extends Model | class SignupInvitation extends Model | ||||
{ | { | ||||
use UuidStrKeyTrait; | |||||
// just created | // just created | ||||
public const STATUS_NEW = 1 << 0; | public const STATUS_NEW = 1 << 0; | ||||
// it's been sent successfully | // it's been sent successfully | ||||
public const STATUS_SENT = 1 << 1; | public const STATUS_SENT = 1 << 1; | ||||
// sending failed | // sending failed | ||||
public const STATUS_FAILED = 1 << 2; | public const STATUS_FAILED = 1 << 2; | ||||
// the user signed up | // the user signed up | ||||
public const STATUS_COMPLETED = 1 << 3; | public const STATUS_COMPLETED = 1 << 3; | ||||
/** | /** | ||||
* Indicates if the IDs are auto-incrementing. | |||||
* | |||||
* @var bool | |||||
*/ | |||||
public $incrementing = false; | |||||
/** | |||||
* The "type" of the auto-incrementing ID. | |||||
* | |||||
* @var string | |||||
*/ | |||||
protected $keyType = 'string'; | |||||
/** | |||||
* The attributes that are mass assignable. | * The attributes that are mass assignable. | ||||
* | * | ||||
* @var array | * @var array | ||||
*/ | */ | ||||
protected $fillable = ['email']; | protected $fillable = ['email']; | ||||
/** | /** | ||||
* Returns whether this invitation process completed (user signed up) | * Returns whether this invitation process completed (user signed up) | ||||
▲ Show 20 Lines • Show All 58 Lines • Show Last 20 Lines |