-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from webceyhan/develop
Add foundation models
- Loading branch information
Showing
60 changed files
with
3,713 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
namespace App\Enums\Concerns; | ||
|
||
trait HasValues | ||
{ | ||
/** | ||
* Get all enum values as an array. | ||
*/ | ||
public static function values(): array | ||
{ | ||
return array_column(static::cases(), 'value'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
namespace App\Enums; | ||
|
||
use App\Enums\Concerns\HasValues; | ||
|
||
enum DeviceStatus: string | ||
{ | ||
use HasValues; | ||
|
||
/** | ||
* Represents a device that has been checked in and is awaiting repair. | ||
* @default | ||
*/ | ||
case CheckedIn = 'checked_in'; | ||
|
||
/** | ||
* Represents a device that is currently on hold due to pending approval or parts. | ||
*/ | ||
case OnHold = 'on_hold'; | ||
|
||
/** | ||
* Represents a device that is currently being repaired by a technician. | ||
*/ | ||
case InRepair = 'in_repair'; | ||
|
||
/** | ||
* Represents that the repair work has been completed, ready to picked up. | ||
*/ | ||
case Finished = 'finished'; | ||
|
||
/** | ||
* Represents a device that has been returned to the customer. | ||
*/ | ||
case CheckedOut = 'checked_out'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
namespace App\Enums; | ||
|
||
use App\Enums\Concerns\HasValues; | ||
|
||
enum DeviceType: string | ||
{ | ||
use HasValues; | ||
|
||
/** | ||
* Represents a mobile phone device. | ||
*/ | ||
case Phone = 'phone'; | ||
|
||
/** | ||
* Represents a tablet device. | ||
*/ | ||
case Tablet = 'tablet'; | ||
|
||
/** | ||
* Represents a laptop device. | ||
*/ | ||
case Laptop = 'laptop'; | ||
|
||
/** | ||
* Represents a desktop computer device. | ||
*/ | ||
case Desktop = 'desktop'; | ||
|
||
/** | ||
* Represents any other device not listed such as a smartwatch or smart TV, | ||
* navigation system, game console, peripheral devices, etc. | ||
* @default | ||
*/ | ||
case Other = 'other'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
namespace App\Enums; | ||
|
||
use App\Enums\Concerns\HasValues; | ||
|
||
enum OrderStatus: string | ||
{ | ||
use HasValues; | ||
|
||
/** | ||
* Represents an order that has been created and is awaiting processing. | ||
* @default | ||
*/ | ||
case New = 'new'; | ||
|
||
/** | ||
* Represents an order that has been shipped to the customer. | ||
*/ | ||
case Shipped = 'shipped'; | ||
|
||
/** | ||
* Represents an order that has been received by the customer. | ||
*/ | ||
case Received = 'received'; | ||
|
||
/** | ||
* Represents an order that has been cancelled by the customer or by the system. | ||
*/ | ||
case Cancelled = 'cancelled'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
namespace App\Enums; | ||
|
||
use App\Enums\Concerns\HasValues; | ||
|
||
enum Priority: string | ||
{ | ||
use HasValues; | ||
|
||
/** | ||
* The model has a low priority and can be addressed later. | ||
*/ | ||
case Low = 'low'; | ||
|
||
/** | ||
* The model has a normal priority and should be addressed soon. | ||
* @default | ||
*/ | ||
case Normal = 'normal'; | ||
|
||
/** | ||
* The model has a high priority and should be addressed as soon as possible. | ||
*/ | ||
case High = 'high'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
namespace App\Enums; | ||
|
||
use App\Enums\Concerns\HasValues; | ||
|
||
enum TaskStatus: string | ||
{ | ||
use HasValues; | ||
|
||
/** | ||
* Represents an task that has been created and is pending approval. | ||
* @default | ||
*/ | ||
case New = 'new'; | ||
|
||
/** | ||
* Represents an task that has been approved and ready to be processed. | ||
*/ | ||
case Approved = 'approved'; | ||
|
||
/** | ||
* Represents an task that has been completed. | ||
*/ | ||
case Completed = 'completed'; | ||
|
||
/** | ||
* Represents an task that has been cancelled. | ||
*/ | ||
case Cancelled = 'cancelled'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
|
||
namespace App\Enums; | ||
|
||
use App\Enums\Concerns\HasValues; | ||
|
||
enum TaskType: string | ||
{ | ||
use HasValues; | ||
|
||
/** | ||
* Represents a task involving the repair of a device. | ||
* This type of task addresses issues or damages in a device that require fixing. | ||
* @default | ||
*/ | ||
case Repair = 'repair'; | ||
|
||
/** | ||
* Represents a task involving the maintenance of a device. | ||
* Maintenance tasks focus on keeping a device in optimal condition, preventing failures or breakdowns. | ||
*/ | ||
case Maintenance = 'maintenance'; | ||
|
||
/** | ||
* Represents a task involving the installation of a device. | ||
* Installation tasks entail setting up and configuring a device for its intended use. | ||
*/ | ||
case Installation = 'installation'; | ||
|
||
/** | ||
* Represents a task involving the inspection of a device. | ||
* Inspection tasks involve assessing the condition or performance of a device to identify any issues or potential problems. | ||
*/ | ||
case Inspection = 'inspection'; | ||
|
||
/** | ||
* Represents a task involving the upgrade of a device. | ||
* Upgrade tasks involve improving the functionality or performance of a device by replacing components or software. | ||
*/ | ||
case Upgrade = 'upgrade'; | ||
|
||
/** | ||
* Represents any other task not listed, such as consultation or training. | ||
*/ | ||
case Other = 'other'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
namespace App\Enums; | ||
|
||
use App\Enums\Concerns\HasValues; | ||
|
||
enum TicketStatus: string | ||
{ | ||
use HasValues; | ||
|
||
/** | ||
* The ticket is new and has not been assigned to anyone. | ||
* @default | ||
*/ | ||
case New = 'new'; | ||
|
||
/** | ||
* The ticket has been assigned to a technician and is in progress. | ||
*/ | ||
case InProgress = 'in_progress'; | ||
|
||
/** | ||
* The ticket is on hold and is not being worked on. | ||
*/ | ||
case OnHold = 'on_hold'; | ||
|
||
/** | ||
* The ticket has been resolved and is awaiting verification. | ||
*/ | ||
case Resolved = 'resolved'; | ||
|
||
/** | ||
* The ticket has been closed and is no longer active. | ||
*/ | ||
case Closed = 'closed'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
namespace App\Enums; | ||
|
||
use App\Enums\Concerns\HasValues; | ||
|
||
enum TransactionMethod: string | ||
{ | ||
use HasValues; | ||
|
||
/** | ||
* Represents transactions via cash. | ||
* @default | ||
*/ | ||
case Cash = 'cash'; | ||
|
||
/** | ||
* Represents transactions via credit or debit cards. | ||
*/ | ||
case Card = 'card'; | ||
|
||
/** | ||
* Represents transaction via online payment systems. | ||
*/ | ||
case Online = 'online'; | ||
} |
Oops, something went wrong.