Skip to content

Commit

Permalink
Merge branch '1-create-table-for-medtype' of https://github.com/E-Hay…
Browse files Browse the repository at this point in the history
…van/e-hayvan-backend into 1-create-table-for-medtype
  • Loading branch information
ituitis20-karadagd20 committed Jan 1, 2024
2 parents 32f4ce5 + e9bb2b4 commit 25ee886
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
package com.production.ehayvanbackendapi.DTO.request;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

public class CreateOrUpdateAppointmentDTO {
@JsonFormat(pattern = "dd-MM-yyyy HH:mm")
@DateTimeFormat(pattern = "dd-MM-yyyy HH:mm")
private Date appointmentDate;
private Integer petID;
private Integer vetID;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package com.production.ehayvanbackendapi.Entities;

import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.persistence.*;
import net.sf.jsqlparser.expression.DateTimeLiteralExpression;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

Expand All @@ -21,6 +23,8 @@ public class Appointment {
@JoinColumn(name = "PetID", referencedColumnName = "PetID")
private Pet PetID;
@Column(nullable = false)
@DateTimeFormat(pattern = "dd-MM-yyyy HH:mm")
@JsonFormat(pattern = "dd-MM-yyyy HH:mm")
private Date AppointmentDate;
public int getAppointmentID() {
return AppointmentID;
Expand Down

0 comments on commit 25ee886

Please sign in to comment.