-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
193 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,193 @@ | ||
export type Json = | ||
| string | ||
| number | ||
| boolean | ||
| null | ||
| { [key: string]: Json | undefined } | ||
| Json[] | ||
|
||
export type Database = { | ||
public: { | ||
Tables: { | ||
hospital_vaccines: { | ||
Row: { | ||
created_at: string | ||
hospital_id: number | ||
updated_at: string | ||
vaccine_id: number | ||
} | ||
Insert: { | ||
created_at?: string | ||
hospital_id: number | ||
updated_at?: string | ||
vaccine_id: number | ||
} | ||
Update: { | ||
created_at?: string | ||
hospital_id?: number | ||
updated_at?: string | ||
vaccine_id?: number | ||
} | ||
Relationships: [ | ||
{ | ||
foreignKeyName: "public_hospital_vaccines_hospital_id_fkey" | ||
columns: ["hospital_id"] | ||
isOneToOne: false | ||
referencedRelation: "hospitals" | ||
referencedColumns: ["id"] | ||
}, | ||
{ | ||
foreignKeyName: "public_hospital_vaccines_vaccine_id_fkey" | ||
columns: ["vaccine_id"] | ||
isOneToOne: false | ||
referencedRelation: "vaccines" | ||
referencedColumns: ["id"] | ||
} | ||
] | ||
} | ||
hospitals: { | ||
Row: { | ||
address: string | ||
address_detail: string | null | ||
created_at: string | ||
id: number | ||
name: string | ||
phone_numner: string | ||
postal_code: string | ||
updated_at: string | ||
} | ||
Insert: { | ||
address: string | ||
address_detail?: string | null | ||
created_at?: string | ||
id?: number | ||
name: string | ||
phone_numner: string | ||
postal_code?: string | ||
updated_at?: string | ||
} | ||
Update: { | ||
address?: string | ||
address_detail?: string | null | ||
created_at?: string | ||
id?: number | ||
name?: string | ||
phone_numner?: string | ||
postal_code?: string | ||
updated_at?: string | ||
} | ||
Relationships: [] | ||
} | ||
vaccines: { | ||
Row: { | ||
created_at: string | ||
id: number | ||
name: string | ||
} | ||
Insert: { | ||
created_at?: string | ||
id?: number | ||
name?: string | ||
} | ||
Update: { | ||
created_at?: string | ||
id?: number | ||
name?: string | ||
} | ||
Relationships: [] | ||
} | ||
} | ||
Views: { | ||
[_ in never]: never | ||
} | ||
Functions: { | ||
[_ in never]: never | ||
} | ||
Enums: { | ||
[_ in never]: never | ||
} | ||
CompositeTypes: { | ||
[_ in never]: never | ||
} | ||
} | ||
} | ||
|
||
export type Tables< | ||
PublicTableNameOrOptions extends | ||
| keyof (Database["public"]["Tables"] & Database["public"]["Views"]) | ||
| { schema: keyof Database }, | ||
TableName extends PublicTableNameOrOptions extends { schema: keyof Database } | ||
? keyof (Database[PublicTableNameOrOptions["schema"]]["Tables"] & | ||
Database[PublicTableNameOrOptions["schema"]]["Views"]) | ||
: never = never | ||
> = PublicTableNameOrOptions extends { schema: keyof Database } | ||
? (Database[PublicTableNameOrOptions["schema"]]["Tables"] & | ||
Database[PublicTableNameOrOptions["schema"]]["Views"])[TableName] extends { | ||
Row: infer R | ||
} | ||
? R | ||
: never | ||
: PublicTableNameOrOptions extends keyof (Database["public"]["Tables"] & | ||
Database["public"]["Views"]) | ||
? (Database["public"]["Tables"] & | ||
Database["public"]["Views"])[PublicTableNameOrOptions] extends { | ||
Row: infer R | ||
} | ||
? R | ||
: never | ||
: never | ||
|
||
export type TablesInsert< | ||
PublicTableNameOrOptions extends | ||
| keyof Database["public"]["Tables"] | ||
| { schema: keyof Database }, | ||
TableName extends PublicTableNameOrOptions extends { schema: keyof Database } | ||
? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"] | ||
: never = never | ||
> = PublicTableNameOrOptions extends { schema: keyof Database } | ||
? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends { | ||
Insert: infer I | ||
} | ||
? I | ||
: never | ||
: PublicTableNameOrOptions extends keyof Database["public"]["Tables"] | ||
? Database["public"]["Tables"][PublicTableNameOrOptions] extends { | ||
Insert: infer I | ||
} | ||
? I | ||
: never | ||
: never | ||
|
||
export type TablesUpdate< | ||
PublicTableNameOrOptions extends | ||
| keyof Database["public"]["Tables"] | ||
| { schema: keyof Database }, | ||
TableName extends PublicTableNameOrOptions extends { schema: keyof Database } | ||
? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"] | ||
: never = never | ||
> = PublicTableNameOrOptions extends { schema: keyof Database } | ||
? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends { | ||
Update: infer U | ||
} | ||
? U | ||
: never | ||
: PublicTableNameOrOptions extends keyof Database["public"]["Tables"] | ||
? Database["public"]["Tables"][PublicTableNameOrOptions] extends { | ||
Update: infer U | ||
} | ||
? U | ||
: never | ||
: never | ||
|
||
export type Enums< | ||
PublicEnumNameOrOptions extends | ||
| keyof Database["public"]["Enums"] | ||
| { schema: keyof Database }, | ||
EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database } | ||
? keyof Database[PublicEnumNameOrOptions["schema"]]["Enums"] | ||
: never = never | ||
> = PublicEnumNameOrOptions extends { schema: keyof Database } | ||
? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName] | ||
: PublicEnumNameOrOptions extends keyof Database["public"]["Enums"] | ||
? Database["public"]["Enums"][PublicEnumNameOrOptions] | ||
: never |