Skip to content

Commit

Permalink
improve for efficient search
Browse files Browse the repository at this point in the history
  • Loading branch information
sasamuku committed Nov 14, 2024
1 parent 4e7e128 commit 9d85a7d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions frontend/packages/db-structure/src/schema/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,13 @@ const relationshipSchema = v.object({
deleteConstraint: v.string(),
})

const tablesSchema = v.record(v.string(), tableSchema)

const relationshipsSchema = v.record(v.string(), relationshipSchema)

export const dbStructureSchema = v.object({
tables: v.array(tableSchema),
relationships: v.array(relationshipSchema),
tables: tablesSchema,
relationships: relationshipsSchema,
})

export type DBStructure = v.InferOutput<typeof dbStructureSchema>

0 comments on commit 9d85a7d

Please sign in to comment.