-- This script only contains the table creation statements and does not fully represent the table in database. It's still missing: indices, triggers. Do not use it as backup.

-- Table Definition
CREATE TABLE "public"."blackjack" (
    "data" text,
    "identifier" text DEFAULT 'blackjack_data'::text
);

-- This script only contains the table creation statements and does not fully represent the table in database. It's still missing: indices, triggers. Do not use it as backup.

-- Squences
CREATE SEQUENCE IF NOT EXISTS players_id_seq

-- Table Definition
CREATE TABLE "public"."players" (
    "id" int4 NOT NULL DEFAULT nextval('players_id_seq'::regclass),
    "username" text NOT NULL,
    "display_name" text NOT NULL,
    "credits" float8
);

-- This script only contains the table creation statements and does not fully represent the table in database. It's still missing: indices, triggers. Do not use it as backup.

-- Table Definition
CREATE TABLE "public"."poker" (
    "data" text,
    "identifier" text DEFAULT 'poker_data'::text
);

-- This script only contains the table creation statements and does not fully represent the table in database. It's still missing: indices, triggers. Do not use it as backup.

-- Table Definition
CREATE TABLE "public"."roulette" (
    "data" text,
    "identifier" text DEFAULT 'roulette_data'::text
);

-- This script only contains the table creation statements and does not fully represent the table in database. It's still missing: indices, triggers. Do not use it as backup.

-- Table Definition
CREATE TABLE "public"."sessions" (
    "data" text,
    "identifier" text DEFAULT 'sessions_data'::text
);

-- This script only contains the table creation statements and does not fully represent the table in database. It's still missing: indices, triggers. Do not use it as backup.

-- Squences
CREATE SEQUENCE IF NOT EXISTS stats_id_seq

-- Table Definition
CREATE TABLE "public"."stats" (
    "id" int4 NOT NULL DEFAULT nextval('stats_id_seq'::regclass),
    "username" text NOT NULL,
    "blackjack_games" int8,
    "roulette_games" int8,
    "poker_games" int8,
    "blackjack_won_games" int8,
    "roulette_won_games" int8,
    "poker_won_games" int8,
    "money_bet" int8,
    "money_earned" int8
);

INSERT INTO "public"."blackjack" ("data", "identifier") VALUES
('[]', 'blackjack_data');


INSERT INTO "public"."players" ("id", "username", "display_name", "credits") VALUES
(8, 'gis', 'Gis', 1147);
INSERT INTO "public"."players" ("id", "username", "display_name", "credits") VALUES
(10, 'test', 'Tester', 1000);
INSERT INTO "public"."players" ("id", "username", "display_name", "credits") VALUES
(11, 'guest', 'guester', 1000);
INSERT INTO "public"."players" ("id", "username", "display_name", "credits") VALUES
(9, 'david', 'Dvd', 2650),
(6, 'simon', 'Simon', 10206);

INSERT INTO "public"."poker" ("data", "identifier") VALUES
('[]', 'poker_data');


INSERT INTO "public"."roulette" ("data", "identifier") VALUES
('{}', 'roulette_data');


INSERT INTO "public"."sessions" ("data", "identifier") VALUES
('[{"id":"8fc8ea87-94a2-4e20-a315-bef5795b4b99","displayName":"Evgi","username":"evgi","credits":10506,"lastActivity":1657280778431},{"id":"d1abae2c-e9b2-4df9-bb92-f7dc9e88d374","displayName":"a","username":"a","credits":5340,"lastActivity":1657640369530},{"id":"d52e06f3-694b-4552-bd4d-58c0062ddead","displayName":"asdasd","username":"asdasd","credits":3593,"lastActivity":1657577539897},{"id":"7cb0abcc-fd94-425a-abaf-be6c67122e9d","displayName":"Gis","username":"gis","credits":1147,"lastActivity":1657640369532},{"id":"7e49c3ae-818e-4a49-ba46-a1980ef33ca6","displayName":"Dvd","username":"david","credits":2650,"lastActivity":1657640499011},{"id":"879c0abd-cfcb-400b-b042-b15f5b59a971","displayName":"Simon","username":"simon","credits":10206,"lastActivity":1657641589917}]', 'sessions_data');


INSERT INTO "public"."stats" ("id", "username", "blackjack_games", "roulette_games", "poker_games", "blackjack_won_games", "roulette_won_games", "poker_won_games", "money_bet", "money_earned") VALUES
(6, 'gis', 0, 4, 0, 0, 1, 0, 72, 216);
INSERT INTO "public"."stats" ("id", "username", "blackjack_games", "roulette_games", "poker_games", "blackjack_won_games", "roulette_won_games", "poker_won_games", "money_bet", "money_earned") VALUES
(8, 'test', 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO "public"."stats" ("id", "username", "blackjack_games", "roulette_games", "poker_games", "blackjack_won_games", "roulette_won_games", "poker_won_games", "money_bet", "money_earned") VALUES
(9, 'guest', 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO "public"."stats" ("id", "username", "blackjack_games", "roulette_games", "poker_games", "blackjack_won_games", "roulette_won_games", "poker_won_games", "money_bet", "money_earned") VALUES
(7, 'david', 0, 2, 2, 0, 2, 1, 1768, 3418),
(4, 'simon', 28, 18, 43, 12, 2, 17, 47175, 33530);
