chore: generate
This commit is contained in:
parent
e9d4ca7e0f
commit
4caec80e67
2 changed files with 27 additions and 90 deletions
|
|
@ -54,7 +54,8 @@ export const queryLiteSubscription = query(async (workspaceID: string) => {
|
||||||
return {
|
return {
|
||||||
mine,
|
mine,
|
||||||
useBalance: row.lite?.useBalance ?? false,
|
useBalance: row.lite?.useBalance ?? false,
|
||||||
region: row.region ?? (await Workspace.setDefaultRegion({ country: countryFromRequest(getRequestEvent()?.request) })),
|
region:
|
||||||
|
row.region ?? (await Workspace.setDefaultRegion({ country: countryFromRequest(getRequestEvent()?.request) })),
|
||||||
rollingUsage: Subscription.analyzeRollingUsage({
|
rollingUsage: Subscription.analyzeRollingUsage({
|
||||||
limit: limits.rollingLimit,
|
limit: limits.rollingLimit,
|
||||||
window: limits.rollingWindow,
|
window: limits.rollingWindow,
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,7 @@
|
||||||
"version": "6",
|
"version": "6",
|
||||||
"dialect": "mysql",
|
"dialect": "mysql",
|
||||||
"id": "d78d7057-b247-4572-9150-2532149169db",
|
"id": "d78d7057-b247-4572-9150-2532149169db",
|
||||||
"prevIds": [
|
"prevIds": ["a946ea14-a35d-49cc-a10a-8c93c30a3cb1"],
|
||||||
"a946ea14-a35d-49cc-a10a-8c93c30a3cb1"
|
|
||||||
],
|
|
||||||
"ddl": [
|
"ddl": [
|
||||||
{
|
{
|
||||||
"name": "account",
|
"name": "account",
|
||||||
|
|
@ -2633,201 +2631,139 @@
|
||||||
"table": "workspace"
|
"table": "workspace"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"columns": [
|
"columns": ["id"],
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"name": "PRIMARY",
|
"name": "PRIMARY",
|
||||||
"table": "account",
|
"table": "account",
|
||||||
"entityType": "pks"
|
"entityType": "pks"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"columns": [
|
"columns": ["id"],
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"name": "PRIMARY",
|
"name": "PRIMARY",
|
||||||
"table": "auth",
|
"table": "auth",
|
||||||
"entityType": "pks"
|
"entityType": "pks"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"columns": [
|
"columns": ["id"],
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"name": "PRIMARY",
|
"name": "PRIMARY",
|
||||||
"table": "benchmark",
|
"table": "benchmark",
|
||||||
"entityType": "pks"
|
"entityType": "pks"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"],
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"name": "PRIMARY",
|
"name": "PRIMARY",
|
||||||
"table": "billing",
|
"table": "billing",
|
||||||
"entityType": "pks"
|
"entityType": "pks"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"columns": [
|
"columns": ["email", "type"],
|
||||||
"email",
|
|
||||||
"type"
|
|
||||||
],
|
|
||||||
"name": "PRIMARY",
|
"name": "PRIMARY",
|
||||||
"table": "coupon",
|
"table": "coupon",
|
||||||
"entityType": "pks"
|
"entityType": "pks"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"],
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"name": "PRIMARY",
|
"name": "PRIMARY",
|
||||||
"table": "lite",
|
"table": "lite",
|
||||||
"entityType": "pks"
|
"entityType": "pks"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"],
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"name": "PRIMARY",
|
"name": "PRIMARY",
|
||||||
"table": "payment",
|
"table": "payment",
|
||||||
"entityType": "pks"
|
"entityType": "pks"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"],
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"name": "PRIMARY",
|
"name": "PRIMARY",
|
||||||
"table": "subscription",
|
"table": "subscription",
|
||||||
"entityType": "pks"
|
"entityType": "pks"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"],
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"name": "PRIMARY",
|
"name": "PRIMARY",
|
||||||
"table": "usage",
|
"table": "usage",
|
||||||
"entityType": "pks"
|
"entityType": "pks"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"columns": [
|
"columns": ["ip", "interval"],
|
||||||
"ip",
|
|
||||||
"interval"
|
|
||||||
],
|
|
||||||
"name": "PRIMARY",
|
"name": "PRIMARY",
|
||||||
"table": "ip_rate_limit",
|
"table": "ip_rate_limit",
|
||||||
"entityType": "pks"
|
"entityType": "pks"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"columns": [
|
"columns": ["ip"],
|
||||||
"ip"
|
|
||||||
],
|
|
||||||
"name": "PRIMARY",
|
"name": "PRIMARY",
|
||||||
"table": "ip",
|
"table": "ip",
|
||||||
"entityType": "pks"
|
"entityType": "pks"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"columns": [
|
"columns": ["key", "interval"],
|
||||||
"key",
|
|
||||||
"interval"
|
|
||||||
],
|
|
||||||
"name": "PRIMARY",
|
"name": "PRIMARY",
|
||||||
"table": "key_rate_limit",
|
"table": "key_rate_limit",
|
||||||
"entityType": "pks"
|
"entityType": "pks"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"columns": [
|
"columns": ["id"],
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"name": "PRIMARY",
|
"name": "PRIMARY",
|
||||||
"table": "model_sticky_provider",
|
"table": "model_sticky_provider",
|
||||||
"entityType": "pks"
|
"entityType": "pks"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"columns": [
|
"columns": ["id", "interval"],
|
||||||
"id",
|
|
||||||
"interval"
|
|
||||||
],
|
|
||||||
"name": "PRIMARY",
|
"name": "PRIMARY",
|
||||||
"table": "model_tpm_rate_limit",
|
"table": "model_tpm_rate_limit",
|
||||||
"entityType": "pks"
|
"entityType": "pks"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"columns": [
|
"columns": ["id", "interval"],
|
||||||
"id",
|
|
||||||
"interval"
|
|
||||||
],
|
|
||||||
"name": "PRIMARY",
|
"name": "PRIMARY",
|
||||||
"table": "model_tps_rate_limit",
|
"table": "model_tps_rate_limit",
|
||||||
"entityType": "pks"
|
"entityType": "pks"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"],
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"name": "PRIMARY",
|
"name": "PRIMARY",
|
||||||
"table": "key",
|
"table": "key",
|
||||||
"entityType": "pks"
|
"entityType": "pks"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"],
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"name": "PRIMARY",
|
"name": "PRIMARY",
|
||||||
"table": "model",
|
"table": "model",
|
||||||
"entityType": "pks"
|
"entityType": "pks"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"],
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"name": "PRIMARY",
|
"name": "PRIMARY",
|
||||||
"table": "provider",
|
"table": "provider",
|
||||||
"entityType": "pks"
|
"entityType": "pks"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"columns": [
|
"columns": ["workspace_id"],
|
||||||
"workspace_id"
|
|
||||||
],
|
|
||||||
"name": "PRIMARY",
|
"name": "PRIMARY",
|
||||||
"table": "referral_code",
|
"table": "referral_code",
|
||||||
"entityType": "pks"
|
"entityType": "pks"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"columns": [
|
"columns": ["workspace_id", "referral_id"],
|
||||||
"workspace_id",
|
|
||||||
"referral_id"
|
|
||||||
],
|
|
||||||
"name": "PRIMARY",
|
"name": "PRIMARY",
|
||||||
"table": "referral_reward",
|
"table": "referral_reward",
|
||||||
"entityType": "pks"
|
"entityType": "pks"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"],
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"name": "PRIMARY",
|
"name": "PRIMARY",
|
||||||
"table": "referral",
|
"table": "referral",
|
||||||
"entityType": "pks"
|
"entityType": "pks"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"columns": [
|
"columns": ["workspace_id", "id"],
|
||||||
"workspace_id",
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"name": "PRIMARY",
|
"name": "PRIMARY",
|
||||||
"table": "user",
|
"table": "user",
|
||||||
"entityType": "pks"
|
"entityType": "pks"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"columns": [
|
"columns": ["id"],
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"name": "PRIMARY",
|
"name": "PRIMARY",
|
||||||
"table": "workspace",
|
"table": "workspace",
|
||||||
"entityType": "pks"
|
"entityType": "pks"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue