Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions src/Models/Ban.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ class Ban extends Model
protected Carbon $timeAdded;

/**
* If the ban is still active.
* If the ban is still active or was disabled.
*
* When a ban was issued by mistake, staff may deactivate it manually, but
* it still shows as inactive in the ban history.
*
* Does not change if the ban expires naturally on the expiration date.
*
* @var bool
*/
Expand All @@ -38,13 +43,17 @@ class Ban extends Model
/**
* The name of the admin that banned the user.
*
* This field is generally redacted when accessing the public API.
*
* @var string
*/
protected string $adminName;

/**
* The TruckersMP ID for the admin that banned the user.
*
* This field is generally redacted when accessing the public API.
*
* @var int
*/
protected int $adminId;
Expand Down Expand Up @@ -98,7 +107,12 @@ public function getCreatedAt(): Carbon
}

/**
* Determine if the ban is active or not.
* Determine if the ban is active or was disabled.
*
* When a ban was issued by mistake, staff may deactivate it manually, but
* it still shows as inactive in the ban history.
*
* Does not change if the ban expires naturally on the expiration date.
*
* @return bool
*/
Expand All @@ -120,6 +134,8 @@ public function getReason(): string
/**
* Get the name of the admin who banned the player.
*
* This field is generally redacted when accessing the public API.
*
* @return string
*/
public function getAdminName(): string
Expand All @@ -130,6 +146,8 @@ public function getAdminName(): string
/**
* Get the TMP ID of the admin who banned the player.
*
* This field is generally redacted when accessing the public API.
*
* @return int
*/
public function getAdminId(): int
Expand Down
Loading