zen: tpm routing
This commit is contained in:
parent
3e8abac625
commit
f74a255ca9
5 changed files with 2746 additions and 29 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { mysqlTable, int, primaryKey, varchar } from "drizzle-orm/mysql-core"
|
||||
import { mysqlTable, int, primaryKey, varchar, bigint } from "drizzle-orm/mysql-core"
|
||||
import { timestamps } from "../drizzle/types"
|
||||
|
||||
export const IpTable = mysqlTable(
|
||||
|
|
@ -31,10 +31,11 @@ export const KeyRateLimitTable = mysqlTable(
|
|||
(table) => [primaryKey({ columns: [table.key, table.interval] })],
|
||||
)
|
||||
|
||||
export const ModelTpmLimitTable = mysqlTable(
|
||||
"model_tpm_limit",
|
||||
export const ModelTpmRateLimitTable = mysqlTable(
|
||||
"model_tpm_rate_limit",
|
||||
{
|
||||
id: varchar("id", { length: 255 }).notNull(),
|
||||
interval: bigint("interval", { mode: "number" }).notNull(),
|
||||
count: int("count").notNull(),
|
||||
},
|
||||
(table) => [primaryKey({ columns: [table.id] })],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue