This commit is contained in:
2026-01-13 13:27:42 +03:00
parent 5e69454678
commit 4925283ede
27 changed files with 6236 additions and 260 deletions

View File

@@ -0,0 +1,55 @@
CREATE TABLE groups (
id serial NOT NULL PRIMARY KEY,
name text,
is_admin boolean DEFAULT false NOT NULL,
is_vip boolean DEFAULT false NOT NULL,
multiplier numeric DEFAULT 1 NOT NULL,
sale double precision DEFAULT 1 NOT NULL,
max_multigen integer DEFAULT 2 NOT NULL,
is_tester boolean DEFAULT false NOT NULL,
max_waifus integer DEFAULT 3 NOT NULL
);
CREATE TABLE users (
id int NOT NULL PRIMARY KEY,
balance decimal(20,0) NOT NULL DEFAULT 0,
name text,
group_id int REFERENCES groups(id),
level int DEFAULT 1,
exp int DEFAULT 0,
work_id int REFERENCES works(id),
work_time timestamp DEFAULT now(),
auto_id int DEFAULT NULL,
business_id int DEFAULT NULL,
maid_id int DEFAULT NULL,
miner_id int DEFAULT NULL,
income_time timestamp DEFAULT now(),
btc decimal(16,6) DEFAULT 0,
invested decimal(20, 0) DEFAULT 0,
pair_id int DEFAULT NULL,
greeting text DEFAULT 'Привет',
donat int DEFAULT 0,
fraction_id int DEFAULT NULL,
money_income decimal(20, 0) DEFAULT 0,
exp_income int DEFAULT 0,
btc_income decimal(16, 6) DEFAULT 0,
waifu_search_time timestamp DEFAULT now()
);
CREATE UNIQUE INDEX users_uindex ON users(id);
CREATE UNIQUE INDEX groups_uindex ON groups(id);
BEGIN TRANSACTION;
INSERT INTO groups VALUES (1, '✨Пользователь✨', false, false, 1.0, 1, 3, false, 3);
INSERT INTO groups VALUES (3, '👾Премиум🌟', false, true, 5, 0.75, 7, false, 3);
INSERT INTO groups VALUES (2, '🔮VIP🔮', false, true, 2.5, 0.9, 5, false, 3);
INSERT INTO groups VALUES (4, '💎Админ💎', true, true, 10, 0.6, 10, true, 3);
INSERT INTO groups VALUES (5, '💰🔱СОЗДАТЕЛЬ🔱💰', true, true, 20, 0.5, 10, true, 3);
INSERT INTO groups VALUES (6, '⚠Тостер⚠', false, true, 3, 0.85, 3, true, 3);
INSERT INTO groups VALUES (1488, '📚Экономист📈', false, true, 14.88, 0.6, 3, false, 3);
INSERT INTO groups VALUES (1337, '🏳🌈ToP GaY In ThE WorlD🏳🌈🌈', false, true, 13.37, 0.7, 3, false, 3);
ALTER SEQUENCE groups_id_seq RESTART WITH 8;
COMMIT TRANSACTION;