Skip to content

Commit

Permalink
Merge pull request #47 from Informatik-Projekt-Kurs/IPK-169-Basic-App…
Browse files Browse the repository at this point in the history
…ointment-Attributes

Added Classes for appointment management and created a appointement m…
  • Loading branch information
bencodes07 authored Aug 28, 2024
2 parents b4cb061 + fccb4a1 commit 880eb8a
Show file tree
Hide file tree
Showing 8 changed files with 72 additions and 1 deletion.
11 changes: 11 additions & 0 deletions src/main/java/com/MeetMate/_experiments/testapp.java
Original file line number Diff line number Diff line change
@@ -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);
// }
//}
24 changes: 24 additions & 0 deletions src/main/java/com/MeetMate/appointment/Appointment.java
Original file line number Diff line number Diff line change
@@ -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;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.MeetMate.appointment;

public class AppointmentController {
}
12 changes: 12 additions & 0 deletions src/main/java/com/MeetMate/appointment/AppointmentRepository.java
Original file line number Diff line number Diff line change
@@ -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<Appointment, Long> {


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.MeetMate.appointment;

public class AppointmentService {
}
8 changes: 8 additions & 0 deletions src/main/java/com/MeetMate/enums/AppointmentStatus.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.MeetMate.enums;

public enum AppointmentStatus {
APPROVED,
DECLINED,
DONE,
CANCELLED;
}
2 changes: 1 addition & 1 deletion src/main/java/com/MeetMate/user/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 8 additions & 0 deletions src/main/resources/graphql/schema.graphqls
Original file line number Diff line number Diff line change
@@ -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!,
Expand All @@ -19,6 +25,8 @@ type Mutation {
): String

deleteCompany: String

#Appointment Mutations
}

type Company {
Expand Down

0 comments on commit 880eb8a

Please sign in to comment.