Skip to content
Snippets Groups Projects
Commit 52fabc03 authored by Connor Brock's avatar Connor Brock
Browse files

Added database schema integeration with Dragon Tale landmarks to store &...

Added database schema integeration with Dragon Tale landmarks to store & access neccessary data associated with all landmarks page.
parent 4c758fdb
No related branches found
No related tags found
1 merge request!43Resolve "As a child, I want a very flashy and modern looking webpage that will draw me in and keep me entertained while following the dragons tale trail."
package Team5.SmartTowns.dragonstale;
import Team5.SmartTowns.landmarks.Landmarks;
import lombok.Data;
import java.util.List;
@Data
public class DragonsTale {
Landmarks landmarks = new Landmarks();
//As there were already landmark fields created, I used composition to import them into the class to be used within the file.
private int landmarkID = landmarks.getLandmarkID();
private String landmarkName = landmarks.getLandmarkName();
private String landmarkDescription = landmarks.getLandmarkDescription();
private String getImgPath;
public static List<Landmarks> landmarksDragonstrail = List.of(
new Landmarks( 1, "A scent of...Dragon", "The Dragon has been spotted near by, find the QR code to continue" , "Start your discovery, at the sweet shop."),
new Landmarks( 2, "They've been found!", "Don't let them escape, find the next QR code to continue!", "Location test")
......
......@@ -14,8 +14,7 @@ DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS stickers;
DROP TABLE IF EXISTS packs;
DROP TABLE IF EXISTS stickerProgress;
DROP TABLE IF EXISTS dragonstale;
/****************************************************************/
......@@ -40,7 +39,6 @@ create table if not exists locations
locationApproved boolean
) engine=InnoDB;
CREATE TABLE IF NOT EXISTS users (
username varchar(30) primary key NOT NULL,
id bigint auto_increment unique, /*DEPRECATED COLUMN, LEFT IN WHILE SOME OTHER FUNCTIONS STILL USE IT*/
......@@ -72,6 +70,7 @@ CREATE TABLE IF NOT EXISTS stickers (
description text NOT NULL,
rarity tinyint
);
CREATE TABLE IF NOT EXISTS stickerProgress (
id bigint auto_increment primary key,
username varchar(30) NOT NULL,
......@@ -101,7 +100,6 @@ create table if not exists locationCoordinates
)engine=InnoDB;
drop table if exists townsWithTrails;
create table if not exists townsWithTrails
(
......@@ -116,3 +114,12 @@ create table if not exists townsWithTrails
)engine=InnoDB;
CREATE TABLE IF NOT EXISTS dragonstale
(
landmarkID bigint auto_increment primary key,
landmarkName varchar(255),
landmarkDescription varchar(2000),
imgPath varchar(255)
)engine=InnoDB;
......@@ -119,6 +119,7 @@ main {
}
}
#trailFragContent {
margin: 0;
padding: 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment