Skip to content

Commit

Permalink
dtos added
Browse files Browse the repository at this point in the history
  • Loading branch information
imertetsu committed Aug 13, 2024
1 parent 59faacd commit 106e22a
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/main/java/com/spacecraft/SpacecraftEventsApplication.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.spacecraft;

import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class SpacecraftEventsApplication implements CommandLineRunner {

public static void main(String[] args) {
SpringApplication.run(SpacecraftEventsApplication.class, args);
}

@Override
public void run(String... args) throws Exception {
System.out.println("Hello World");
}
}
16 changes: 16 additions & 0 deletions src/main/java/com/spacecraft/dtos/EventDTO.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.spacecraft.dtos;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

@Data
public class EventDTO {
@JsonProperty("occurrence_time")
private String occurrenceTime;
@JsonProperty("event_name")
private String eventName;
private String id;
private String severity;
private double longitude;
private double latitude;
}
9 changes: 9 additions & 0 deletions src/main/java/com/spacecraft/dtos/LatitudeDTO.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.spacecraft.dtos;

import lombok.Data;

@Data
public class LatitudeDTO {
private String timestamp;
private double position;
}
9 changes: 9 additions & 0 deletions src/main/java/com/spacecraft/dtos/LongitudeDTO.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.spacecraft.dtos;

import lombok.Data;

@Data
public class LongitudeDTO {
private String timestamp;
private double position;
}
1 change: 1 addition & 0 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
spring.application.name=SpacecraftEvents
13 changes: 13 additions & 0 deletions src/test/java/com/spacecraft/SpacecraftEventsApplicationTests.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.spacecraft;

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
class SpacecraftEventsApplicationTests {

@Test
void contextLoads() {
}

}

0 comments on commit 106e22a

Please sign in to comment.