Added tour data model

This commit is contained in:
Filip Izydorczyk 2020-12-08 18:16:17 +01:00
parent acf80cc78d
commit b1091cd3bc
3 changed files with 72 additions and 38 deletions

View File

@ -46,10 +46,7 @@ W paczce dla proda w protpertiesach poufne dane odczytywane są ze zmiennych śr
Zeby spakowac apke do `jara` wystarcza dwie komendy zaczynajac z glownego katalogu projektu Zeby spakowac apke do `jara` wystarcza dwie komendy zaczynajac z glownego katalogu projektu
``` ```
mvn clean mvn clean; mvn install; cd restservice; mvn clean package spring-boot:repackage
mvn install
cd restservice
mvn clean package spring-boot:repackage
``` ```
Utworzony zostanie jar w `restservice/target/restservice-1.0-SNAPSHOT.jar`. Oczywiscie zeby jar zadzialal kontenery dockerowe musza byc odpalone (lub baza danych na serwerze jesli zmienialismy propertisy z localhost) Utworzony zostanie jar w `restservice/target/restservice-1.0-SNAPSHOT.jar`. Oczywiscie zeby jar zadzialal kontenery dockerowe musza byc odpalone (lub baza danych na serwerze jesli zmienialismy propertisy z localhost)

View File

@ -1,51 +1,50 @@
package com.plannaplan.models; package com.plannaplan.models;
import java.util.Date;
import java.io.InputStream; import java.io.InputStream;
public class ConfigData { public class ConfigData {
private Date start; private TourData firstTour;
private Date end; private TourData secondTour;
private InputStream filestream; private InputStream filestream;
/* /**
* ConfigData * constructor
* *
* @param start when the configdata begins * @param firstTour date of first tours
* @param end when the configdata ends * @param secondTour date of second tours
* @param filestream where the filestream is * @param filestream filestram with data to import
*/ */
public ConfigData(Date start, Date end, InputStream filestream) { public ConfigData(TourData firstTour, TourData secondTour, InputStream filestream) {
this.start = start; this.firstTour = firstTour;
this.end = end; this.secondTour = secondTour;
this.filestream = filestream; this.filestream = filestream;
} }
/* /**
* getFilestream * second tour getter
* *
* @return filestream * @return TourData second tour
*/
public TourData getSecondTour() {
return secondTour;
}
/**
* first tour getter
*
* @return TourData first tour
*/
public TourData getFirstTour() {
return firstTour;
}
/**
* filestream getter
*
* @return InputStream with data to import
*/ */
public InputStream getFilestream() { public InputStream getFilestream() {
return filestream; return filestream;
} }
/*
* getEnd
*
* @return end
*/
public Date getEnd() {
return end;
}
/*
* getStart
*
* @return start
*/
public Date getStart() {
return start;
}
} }

View File

@ -0,0 +1,38 @@
package com.plannaplan.models;
import java.util.Date;
public class TourData {
private Date start;
private Date end;
/**
* construcotr
*
* @param start Date when tour start
* @param end Date when tour end
*/
public TourData(Date start, Date end) {
this.start = start;
this.end = end;
}
/**
* tour end getter
*
* @return Date end of tour
*/
public Date getEnd() {
return end;
}
/**
* tour start getter
*
* @return Date beginning of tour
*/
public Date getStart() {
return start;
}
}