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

Commented out all non working code to fix major bugs on other branch! #48

Merged
merged 1 commit into from
Sep 2, 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
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ services:
build:
context: .
dockerfile: Dockerfile
restart: always
ports:
- "8081:8080"
depends_on:
Expand Down
48 changes: 24 additions & 24 deletions src/main/java/com/MeetMate/appointment/Appointment.java
Original file line number Diff line number Diff line change
@@ -1,24 +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;
}
//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;
//}
34 changes: 30 additions & 4 deletions src/main/java/com/MeetMate/appointment/AppointmentController.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,30 @@
package com.MeetMate.appointment;

public class AppointmentController {
}
//package com.MeetMate.appointment;
//
//import com.MeetMate.company.Company;
//import lombok.RequiredArgsConstructor;
//import org.springframework.graphql.data.method.annotation.Argument;
//import org.springframework.graphql.data.method.annotation.QueryMapping;
//
//@RequiredArgsConstructor
//public class AppointmentController {
// private final AppointmentService appointmentService;
//
// @QueryMapping
// public Company getAppointment(@Argument long id) {
// try {
// return appointmentService.getAppointment(id);
//
// } catch (Throwable t) {
// Class<? extends Throwable> tc = t.getClass();
// return null;
//// if (tc == EntityNotFoundException.class)
//// return ResponseEntity.status(HttpStatus.NOT_FOUND).body("message: " + t.getMessage());
////
//// if (tc == IllegalArgumentException.class)
//// return ResponseEntity.status(HttpStatus.BAD_REQUEST).body("message: " + t.getMessage());
////
//// return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("message: " + t.getMessage());
// }
// }
//
//}
24 changes: 12 additions & 12 deletions src/main/java/com/MeetMate/appointment/AppointmentRepository.java
Original file line number Diff line number Diff line change
@@ -1,12 +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> {


}
//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
@@ -1,4 +1,4 @@
package com.MeetMate.appointment;

public class AppointmentService {
}
//package com.MeetMate.appointment;
//
//public class AppointmentService {
//}
3 changes: 2 additions & 1 deletion src/main/java/com/MeetMate/company/CompanyController.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@
import org.springframework.graphql.data.method.annotation.QueryMapping;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.lang.reflect.InaccessibleObjectException;

@RestController
@Controller
@RequestMapping(path = "api/company")
@RequiredArgsConstructor
public class CompanyController {
Expand Down
Loading