improve migration class
This commit is contained in:
21
enums/Aggregation.php
Normal file
21
enums/Aggregation.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
namespace DatabaseHelper\enums;
|
||||
|
||||
enum Aggregation
|
||||
{
|
||||
case COUNT;
|
||||
case SUM;
|
||||
case AVG;
|
||||
case MIN;
|
||||
case MAX;
|
||||
|
||||
public function toString(): string {
|
||||
return match ($this) {
|
||||
self::COUNT => 'COUNT',
|
||||
self::SUM => 'SUM',
|
||||
self::AVG => 'AVG',
|
||||
self::MIN => 'MIN',
|
||||
self::MAX => 'MAX',
|
||||
};
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user