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
```
mvn clean
mvn install
cd restservice
mvn clean package spring-boot:repackage
mvn clean; 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)

View File

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