diff --git a/src/main/java/com/MeetMate/_experiments/testapp.java b/src/main/java/com/MeetMate/_experiments/testapp.java new file mode 100644 index 0000000..024d90a --- /dev/null +++ b/src/main/java/com/MeetMate/_experiments/testapp.java @@ -0,0 +1,11 @@ +//package com.MeetMate._experiments; +// +//import java.time.LocalDateTime; +//import java.time.Period; +// +//public class testapp { +// public static void main(String[] args) { +// Object o = Period.between(LocalDateTime.now(), LocalDateTime.now().plusDays(1)); +// System.out.println(o); +// } +//} diff --git a/src/main/java/com/MeetMate/appointment/Appointment.java b/src/main/java/com/MeetMate/appointment/Appointment.java new file mode 100644 index 0000000..bb730c8 --- /dev/null +++ b/src/main/java/com/MeetMate/appointment/Appointment.java @@ -0,0 +1,24 @@ +package com.MeetMate.appointment; + +import com.MeetMate.enums.AppointmentStatus; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.springframework.data.mongodb.core.mapping.Document; + +import java.time.LocalDateTime; + +@Document(collection = "appointments") +@Data +@NoArgsConstructor +public class Appointment { + long id; + LocalDateTime from; + LocalDateTime to; + long companyID; + long clientID; + long assigneeID; +// Select Prompt → f.E. medical industry: Untersuchung, Operation + String description; + String location; + AppointmentStatus status; +} diff --git a/src/main/java/com/MeetMate/appointment/AppointmentController.java b/src/main/java/com/MeetMate/appointment/AppointmentController.java new file mode 100644 index 0000000..877c991 --- /dev/null +++ b/src/main/java/com/MeetMate/appointment/AppointmentController.java @@ -0,0 +1,4 @@ +package com.MeetMate.appointment; + +public class AppointmentController { +} diff --git a/src/main/java/com/MeetMate/appointment/AppointmentRepository.java b/src/main/java/com/MeetMate/appointment/AppointmentRepository.java new file mode 100644 index 0000000..d5e9e4c --- /dev/null +++ b/src/main/java/com/MeetMate/appointment/AppointmentRepository.java @@ -0,0 +1,12 @@ +package com.MeetMate.appointment; + +import org.springframework.data.mongodb.repository.MongoRepository; +import org.springframework.stereotype.Repository; + +import java.util.Optional; + +@Repository +public interface AppointmentRepository extends MongoRepository { + + +} diff --git a/src/main/java/com/MeetMate/appointment/AppointmentService.java b/src/main/java/com/MeetMate/appointment/AppointmentService.java new file mode 100644 index 0000000..f7ba121 --- /dev/null +++ b/src/main/java/com/MeetMate/appointment/AppointmentService.java @@ -0,0 +1,4 @@ +package com.MeetMate.appointment; + +public class AppointmentService { +} diff --git a/src/main/java/com/MeetMate/enums/AppointmentStatus.java b/src/main/java/com/MeetMate/enums/AppointmentStatus.java new file mode 100644 index 0000000..9b26f06 --- /dev/null +++ b/src/main/java/com/MeetMate/enums/AppointmentStatus.java @@ -0,0 +1,8 @@ +package com.MeetMate.enums; + +public enum AppointmentStatus { + APPROVED, + DECLINED, + DONE, + CANCELLED; +} \ No newline at end of file diff --git a/src/main/java/com/MeetMate/user/User.java b/src/main/java/com/MeetMate/user/User.java index d215b6b..0cb66cb 100644 --- a/src/main/java/com/MeetMate/user/User.java +++ b/src/main/java/com/MeetMate/user/User.java @@ -21,7 +21,7 @@ public class User implements UserDetails { @Id @SequenceGenerator(name = "user_sequence", allocationSize = 1) @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "user_sequence") - private Long id; + private long id; private String name; private String email; private String password; diff --git a/src/main/resources/graphql/schema.graphqls b/src/main/resources/graphql/schema.graphqls index ee4ebf1..8f114d4 100644 --- a/src/main/resources/graphql/schema.graphqls +++ b/src/main/resources/graphql/schema.graphqls @@ -1,10 +1,16 @@ #graphqls for graphql scema type Query { + + #Company Queries getCompany(id: ID!): Company + + #Appointment Queries } type Mutation { + + #Company Mutations createCompany( companyName: String!, ownerEmail: String!, @@ -19,6 +25,8 @@ type Mutation { ): String deleteCompany: String + + #Appointment Mutations } type Company {