Deploy: 2026-05-22 23:55:19
This commit is contained in:
25
backend/app/Models/SubscriptionPlan.php
Normal file
25
backend/app/Models/SubscriptionPlan.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Core\Database;
|
||||
|
||||
/**
|
||||
* SubscriptionPlan Model
|
||||
* Represents SaaS pricing and request limit plans.
|
||||
*/
|
||||
class SubscriptionPlan extends BaseModel
|
||||
{
|
||||
protected static string $table = 'subscription_plans';
|
||||
|
||||
/**
|
||||
* Get plan by name
|
||||
*/
|
||||
public static function findByName(string $name): ?array
|
||||
{
|
||||
return Database::selectOne(
|
||||
"SELECT * FROM " . static::$table . " WHERE name = ? LIMIT 1",
|
||||
[$name]
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user