server: add configuration for install notifications (#4331)
* server: track `installed_at`, only send install notification on first install * server: add configuration for install notifications
This commit is contained in:
parent
23124c9b08
commit
8e1a21563e
4 changed files with 59 additions and 6 deletions
|
@ -38,6 +38,7 @@ use Pterodactyl\Exceptions\Http\Server\ServerStateConflictException;
|
|||
* @property int $backup_limit
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property \Illuminate\Support\Carbon|null $installed_at
|
||||
* @property \Illuminate\Database\Eloquent\Collection|\Pterodactyl\Models\ActivityLog[] $activity
|
||||
* @property int|null $activity_count
|
||||
* @property \Pterodactyl\Models\Allocation|null $allocation
|
||||
|
@ -128,6 +129,7 @@ class Server extends Model
|
|||
protected $attributes = [
|
||||
'status' => self::STATUS_INSTALLING,
|
||||
'oom_disabled' => true,
|
||||
'installed_at' => null,
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -142,14 +144,14 @@ class Server extends Model
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $dates = [self::CREATED_AT, self::UPDATED_AT, 'deleted_at'];
|
||||
protected $dates = [self::CREATED_AT, self::UPDATED_AT, 'deleted_at', 'installed_at'];
|
||||
|
||||
/**
|
||||
* Fields that are not mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $guarded = ['id', self::CREATED_AT, self::UPDATED_AT, 'deleted_at'];
|
||||
protected $guarded = ['id', self::CREATED_AT, self::UPDATED_AT, 'deleted_at', 'installed_at'];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue