Implement photon art table and enemy data table. Fix endpoints

pull/1/head
sigonasr2 3 years ago
parent a9859867cd
commit ad0509164d
  1. 7
      ngsplanner_schema.sql
  2. 8
      ngsplanner_seed.sql
  3. 12
      server.js

@ -248,7 +248,7 @@ CREATE TABLE "augment_type" (
"icon" text
);
CREATE TABLE "weapon_skill" (
CREATE TABLE "photon_art" (
"id" SERIAL UNIQUE PRIMARY KEY,
"name" text,
"weapon_type_id" int,
@ -257,8 +257,7 @@ CREATE TABLE "weapon_skill" (
"pp" int,
"frames" int,
"dps" int,
"description" text,
"skill_dependency" text
"property" int
);
CREATE TABLE "enemy_data" (
@ -298,4 +297,4 @@ ALTER TABLE "augment" ADD FOREIGN KEY ("augment_type_id") REFERENCES "augment_ty
ALTER TABLE "database_audit" ADD FOREIGN KEY ("users_id") REFERENCES "users" ("id");
ALTER TABLE "weapon_skill" ADD FOREIGN KEY ("weapon_type_id") REFERENCES "weapon_type" ("id");
ALTER TABLE "photon_art" ADD FOREIGN KEY ("weapon_type_id") REFERENCES "weapon_type" ("id");

@ -241,10 +241,10 @@ insert into database_audit(action,table_name,row_name,row_id,old_value,new_value
insert into database_audit(action,table_name,row_name,row_id,old_value,new_value,date,users_id)
values('UPDATE','skill_data','mel_dmg',1,'0.01','0','2018-07-17 19:45+00',(select id from users where username='sigonasr3' limit 1));
insert into weapon_skill(name,weapon_type_id,potency,power_distribution,pp,frames,dps,description,skill_dependency)
values('Normal Attack Lv1',(select id from weapon_type where name='Twin Dagger' limit 1),100,0.45,2,20,270,'');
insert into weapon_skill(name,weapon_type_id,potency,power_distribution,pp,frames,dps,description,skill_dependency)
values('Spin Counter',(select id from weapon_type where name='Twin Dagger' limit 1),100,3,8,38,521,'');
insert into photon_art(name,weapon_type_id,potency,power_distribution,pp,frames,dps)
values('Normal Attack Lv1',(select id from weapon_type where name='Twin Dagger' limit 1),100,0.45,2,20,270);
insert into photon_art(name,weapon_type_id,potency,power_distribution,pp,frames,dps)
values('Spin Counter',(select id from weapon_type where name='Twin Dagger' limit 1),100,3,8,38,521);
insert into enemy_data(level,def,atk)
values(1,450,900);

@ -82,6 +82,12 @@ const ENDPOINTDATA=[
optionalfields:["icon"],
excludedfields:[] //Fields to not output in GET.
},
{
endpoint:"photon_art",
requiredfields:["name","weapon_type_id","potency","dps"],
optionalfields:["power_distribution","pp","frames"],
excludedfields:[] //Fields to not output in GET.
},
{
endpoint:"armor",
requiredfields:["name","rarity","level_req","def"],
@ -136,6 +142,12 @@ const ENDPOINTDATA=[
optionalfields:["icon"],
excludedfields:[] //Fields to not output in GET.
},
{
endpoint:"enemy_data",
requiredfields:["level","def","atk"],
optionalfields:[],
excludedfields:[] //Fields to not output in GET.
},
{
endpoint:"food",
requiredfields:["name"],

Loading…
Cancel
Save