feat: Reimplement order and invoice management with new service and repository layers, introduce compression middleware, and update database schema.
This commit is contained in:
@@ -37,4 +37,21 @@ enum ProductBillingCycle: string
|
||||
self::TRIENNIALLY => 36,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve from the legacy admin integer billing code:
|
||||
* 2 → monthly, 3 → quarterly, 4 → semi_annually, 5 → annually
|
||||
*/
|
||||
public static function fromLegacyCode(int $code): self
|
||||
{
|
||||
return match ($code) {
|
||||
2 => self::MONTHLY,
|
||||
3 => self::QUARTERLY,
|
||||
4 => self::SEMI_ANNUALLY,
|
||||
5 => self::ANNUALLY,
|
||||
6 => self::BIENNIALLY,
|
||||
7 => self::TRIENNIALLY,
|
||||
default => self::MONTHLY,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user