Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Classes for appointment management and created a appointement m… #47

Merged
merged 1 commit into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading