diff --git a/pages/marketplace.vue b/pages/marketplace.vue new file mode 100644 index 0000000..2e8d87b --- /dev/null +++ b/pages/marketplace.vue @@ -0,0 +1,181 @@ + + + + + \ No newline at end of file diff --git a/types/MarketplacePlayer.d.ts b/types/MarketplacePlayer.d.ts new file mode 100644 index 0000000..9c2cab3 --- /dev/null +++ b/types/MarketplacePlayer.d.ts @@ -0,0 +1,12 @@ +export interface MarketplacePlayer { + player_id: number + player_name: string + cardset_name: string + player_cost: number + rarity_name: string + rarity_color: string + franchise_name: string + player_headshot: string + player_card_image: string + player_card_image2: string + } \ No newline at end of file diff --git a/types/supabase.d.ts b/types/supabase.d.ts index dccb843..9dd878c 100644 --- a/types/supabase.d.ts +++ b/types/supabase.d.ts @@ -9,6 +9,69 @@ export type Json = export type Database = { public: { Tables: { + cards: { + Row: { + created_at: string; + id: number; + pack_id: number | null; + player_id: number; + team_id: number; + variant: number | null; + }; + Insert: { + created_at?: string; + id?: number; + pack_id?: number | null; + player_id: number; + team_id: number; + variant?: number | null; + }; + Update: { + created_at?: string; + id?: number; + pack_id?: number | null; + player_id?: number; + team_id?: number; + variant?: number | null; + }; + Relationships: [ + { + foreignKeyName: "cards_pack_id_fkey"; + columns: ["pack_id"]; + isOneToOne: false; + referencedRelation: "packs"; + referencedColumns: ["id"]; + }, + { + foreignKeyName: "cards_player_id_fkey"; + columns: ["player_id"]; + isOneToOne: false; + referencedRelation: "marketplace"; + referencedColumns: ["player_id"]; + }, + { + foreignKeyName: "cards_player_id_fkey"; + columns: ["player_id"]; + isOneToOne: false; + referencedRelation: "players"; + referencedColumns: ["id"]; + }, + { + foreignKeyName: "cards_player_id_fkey"; + columns: ["player_id"]; + isOneToOne: false; + referencedRelation: "random_player"; + referencedColumns: ["id"]; + }, + { + foreignKeyName: "cards_team_id_fkey"; + columns: ["team_id"]; + isOneToOne: false; + referencedRelation: "teams"; + referencedColumns: ["id"]; + }, + ]; + }; cardsets: { Row: { created_at: string; @@ -75,6 +138,95 @@ export type Database = { }; Relationships: []; }; + pack_type: { + Row: { + card_count: number | null; + cost: number; + created_at: string; + description: string | null; + for_purchase: boolean | null; + id: number; + name: string; + }; + Insert: { + card_count?: number | null; + cost: number; + created_at?: string; + description?: string | null; + for_purchase?: boolean | null; + id?: number; + name: string; + }; + Update: { + card_count?: number | null; + cost?: number; + created_at?: string; + description?: string | null; + for_purchase?: boolean | null; + id?: number; + name?: string; + }; + Relationships: []; + }; + packs: { + Row: { + created_at: string; + id: number; + open_time: string | null; + owner_team_id: number | null; + pack_cardset_id: number | null; + pack_team_id: number | null; + pack_type_id: number | null; + }; + Insert: { + created_at?: string; + id?: number; + open_time?: string | null; + owner_team_id?: number | null; + pack_cardset_id?: number | null; + pack_team_id?: number | null; + pack_type_id?: number | null; + }; + Update: { + created_at?: string; + id?: number; + open_time?: string | null; + owner_team_id?: number | null; + pack_cardset_id?: number | null; + pack_team_id?: number | null; + pack_type_id?: number | null; + }; + Relationships: [ + { + foreignKeyName: "packs_owner_team_id_fkey"; + columns: ["owner_team_id"]; + isOneToOne: false; + referencedRelation: "teams"; + referencedColumns: ["id"]; + }, + { + foreignKeyName: "packs_pack_cardset_id_fkey"; + columns: ["pack_cardset_id"]; + isOneToOne: false; + referencedRelation: "cardsets"; + referencedColumns: ["id"]; + }, + { + foreignKeyName: "packs_pack_team_id_fkey"; + columns: ["pack_team_id"]; + isOneToOne: false; + referencedRelation: "teams"; + referencedColumns: ["id"]; + }, + { + foreignKeyName: "packs_pack_type_id_fkey"; + columns: ["pack_type_id"]; + isOneToOne: false; + referencedRelation: "pack_type"; + referencedColumns: ["id"]; + }, + ]; + }; players: { Row: { bbref_id: string | null; @@ -217,13 +369,47 @@ export type Database = { }; Relationships: []; }; + rosters: { + Row: { + created_at: string; + description: string | null; + id: number; + name: string; + team_id: number; + }; + Insert: { + created_at?: string; + description?: string | null; + id?: number; + name: string; + team_id: number; + }; + Update: { + created_at?: string; + description?: string | null; + id?: number; + name?: string; + team_id?: number; + }; + Relationships: [ + { + foreignKeyName: "rosters_team_id_fkey"; + columns: ["team_id"]; + isOneToOne: false; + referencedRelation: "teams"; + referencedColumns: ["id"]; + }, + ]; + }; teams: { Row: { abbrev: string | null; career: string | null; collection_value: string | null; color: string | null; + discord_id: string; event_id: string | null; + gm_profile_id: string | null; gmid: number | null; gmname: string | null; gsheet: string | null; @@ -243,27 +429,9 @@ export type Database = { career?: string | null; collection_value?: string | null; color?: string | null; + discord_id: string; event_id?: string | null; - gmid?: number | null; - gmname?: string | null; - gsheet?: string | null; - has_guide?: string | null; - id: number; - is_ai?: number | null; - lname?: string | null; - logo?: string | null; - ranking?: number | null; - season?: number | null; - sname?: string | null; - team_value?: string | null; - wallet?: number | null; - }; - Update: { - abbrev?: string | null; - career?: string | null; - collection_value?: string | null; - color?: string | null; - event_id?: string | null; + gm_profile_id?: string | null; gmid?: number | null; gmname?: string | null; gsheet?: string | null; @@ -278,10 +446,53 @@ export type Database = { team_value?: string | null; wallet?: number | null; }; - Relationships: []; + Update: { + abbrev?: string | null; + career?: string | null; + collection_value?: string | null; + color?: string | null; + discord_id?: string; + event_id?: string | null; + gm_profile_id?: string | null; + gmid?: number | null; + gmname?: string | null; + gsheet?: string | null; + has_guide?: string | null; + id?: number; + is_ai?: number | null; + lname?: string | null; + logo?: string | null; + ranking?: number | null; + season?: number | null; + sname?: string | null; + team_value?: string | null; + wallet?: number | null; + }; + Relationships: [ + { + foreignKeyName: "teams_gm_profile_id_fkey"; + columns: ["gm_profile_id"]; + isOneToOne: false; + referencedRelation: "profiles"; + referencedColumns: ["id"]; + }, + ]; }; }; Views: { + marketplace: { + Row: { + cardset_name: string | null; + franchise_name: Database["public"]["Enums"]["franchise"] | null; + player_cost: number | null; + player_id: number | null; + player_name: string | null; + player_positions: string[] | null; + rarity_color: string | null; + rarity_name: string | null; + }; + Relationships: []; + }; random_player: { Row: { bbref_id: string | null;