Save UserMissionPoint, UserTrainingRoom, UserGeneralData
Add GamePoint, GamePresent, GameReward to database
Add custom maintenance time to database
Save the battle point and rating info send by the game to database
[api]
Read user_general_data table
This commit is contained in:
samnyan
2020-03-23 03:44:46 +09:00
parent 283b70a243
commit 197e4ebab0
38 changed files with 858 additions and 63 deletions

View File

@@ -0,0 +1,66 @@
create table ongeki_user_mission_point
(
id bigint auto_increment
primary key,
event_id int not null,
point bigint not null,
user_id bigint null,
constraint FK867xgd2c5g6ic4k1tbd32hhqb
foreign key (user_id) references ongeki_user_data (id)
);
create table ongeki_game_point
(
id bigint not null
primary key,
type int not null,
cost int not null,
start_date varchar(255) not null,
end_date varchar(255) not null
);
create table ongeki_game_present
(
id bigint not null
primary key,
present_name varchar(255) not null,
reward_id int not null,
stock int not null,
message varchar(255) not null,
start_date varchar(255) not null,
end_date varchar(255) not null
);
create table ongeki_game_reward
(
id bigint not null
primary key,
item_kind int not null,
item_id int not null
);
create table ongeki_user_general_data
(
id bigint auto_increment
primary key,
property_key varchar(255) not null,
property_value text not null,
user_id bigint null,
constraint UK2upnsa6nothlfrqewa4tma62d
unique (user_id, property_key),
constraint FKj1v48ag7iyelf1va5hbcv63uj
foreign key (user_id) references ongeki_user_data (id)
);
INSERT INTO ongeki_game_point (id, type, cost, start_date, end_date)
VALUES (1, 0, 100, '2000-01-01 05:00:00.0', '2099-01-01 05:00:00.0');
INSERT INTO ongeki_game_point (id, type, cost, start_date, end_date)
VALUES (2, 1, 200, '2000-01-01 05:00:00.0', '2099-01-01 05:00:00.0');
INSERT INTO ongeki_game_point (id, type, cost, start_date, end_date)
VALUES (3, 2, 300, '2000-01-01 05:00:00.0', '2099-01-01 05:00:00.0');
INSERT INTO ongeki_game_point (id, type, cost, start_date, end_date)
VALUES (4, 3, 333, '2000-01-01 05:00:00.0', '2099-01-01 05:00:00.0');
INSERT INTO ongeki_game_point (id, type, cost, start_date, end_date)
VALUES (5, 4, 666, '2000-01-01 05:00:00.0', '2099-01-01 05:00:00.0');
INSERT INTO ongeki_game_point (id, type, cost, start_date, end_date)
VALUES (6, 5, 999, '2000-01-01 05:00:00.0', '2099-01-01 05:00:00.0');

View File

@@ -0,0 +1,2 @@
INSERT INTO property (property_key, property_value) VALUE ('reboot_start_time', '2020-01-01 23:59:00.0');
INSERT INTO property (property_key, property_value) VALUE ('reboot_end_time', '2020-01-01 23:59:00.0');

View File

@@ -0,0 +1,74 @@
-- Table: ongeki_user_mission_point
CREATE TABLE ongeki_user_mission_point
(
id INTEGER,
event_id INTEGER NOT NULL,
point BIGINT NOT NULL,
user_id BIGINT REFERENCES ongeki_user_data (id) ON DELETE CASCADE,
PRIMARY KEY (
id
),
CONSTRAINT ongeki_user_mission_point_uq UNIQUE (
event_id,
user_id
) ON CONFLICT REPLACE
);
CREATE TABLE ongeki_game_point
(
id BIGINT,
type INTEGER NOT NULL,
cost INTEGER NOT NULL,
start_date VARCHAR(255) NOT NULL,
end_date VARCHAR(255) NOT NULL,
PRIMARY KEY (
id
)
);
CREATE TABLE ongeki_game_present
(
id BIGINT,
present_name VARCHAR(255) NOT NULL,
reward_id INTEGER NOT NULL,
stock INTEGER NOT NULL,
message VARCHAR(255) NOT NULL,
start_date VARCHAR(255) NOT NULL,
end_date VARCHAR(255) NOT NULL,
PRIMARY KEY (
id
)
);
CREATE TABLE ongeki_game_reward
(
id BIGINT,
item_kind INTEGER NOT NULL,
item_id INTEGER NOT NULL,
PRIMARY KEY (
id
)
);
CREATE TABLE ongeki_user_general_data
(
id INTEGER,
property_key VARCHAR NOT NULL,
property_value VARCHAR NOT NULL,
user_id BIGINT REFERENCES ongeki_user_data (id) ON DELETE CASCADE,
PRIMARY KEY (
id
),
CONSTRAINT ongeki_user_general_data_uq UNIQUE (
property_key,
user_id
) ON CONFLICT REPLACE
);
INSERT INTO ongeki_game_point (id, type, cost, start_date, end_date) VALUES (1, 0, 100, '2000-01-01 05:00:00.0', '2099-01-01 05:00:00.0');
INSERT INTO ongeki_game_point (id, type, cost, start_date, end_date) VALUES (2, 1, 200, '2000-01-01 05:00:00.0', '2099-01-01 05:00:00.0');
INSERT INTO ongeki_game_point (id, type, cost, start_date, end_date) VALUES (3, 2, 300, '2000-01-01 05:00:00.0', '2099-01-01 05:00:00.0');
INSERT INTO ongeki_game_point (id, type, cost, start_date, end_date) VALUES (4, 3, 333, '2000-01-01 05:00:00.0', '2099-01-01 05:00:00.0');
INSERT INTO ongeki_game_point (id, type, cost, start_date, end_date) VALUES (5, 4, 666, '2000-01-01 05:00:00.0', '2099-01-01 05:00:00.0');
INSERT INTO ongeki_game_point (id, type, cost, start_date, end_date) VALUES (6, 5, 999, '2000-01-01 05:00:00.0', '2099-01-01 05:00:00.0');

View File

@@ -0,0 +1,2 @@
INSERT INTO property (property_key, property_value) VALUE ('reboot_start_time', '2020-01-01 23:59:00.0');
INSERT INTO property (property_key, property_value) VALUE ('reboot_end_time', '2020-01-01 23:59:00.0');