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 b864aa8 + c9cfa3c commit d3a9f22
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
package com.production.ehayvanbackendapi.DTO;

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

import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

public class ScheduleDTO {
private Integer scheduleID;
@JsonFormat(pattern = "dd-MM-yyyy HH:mm")
@DateTimeFormat(pattern = "dd-MM-yyyy HH:mm")
private LocalDateTime beginningDate;
private Integer doseFrequency;
private Integer doseCount;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
package com.production.ehayvanbackendapi.DTO.request;

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

import java.time.LocalDateTime;
import java.util.Date;

public class CreateOrUpdateScheduleDTO {

@JsonFormat(pattern = "dd-MM-yyyy HH:mm")
@DateTimeFormat(pattern = "dd-MM-yyyy HH:mm")
private LocalDateTime beginningDate;
private Integer doseFrequency;
private Integer doseCount;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package com.production.ehayvanbackendapi.Entities;

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

import java.time.LocalDateTime;
import java.util.Date;
Expand All @@ -17,6 +19,8 @@ public class Schedule {
private Integer ScheduleID;
@OneToMany(mappedBy = "ScheduleID", cascade = CascadeType.ALL)
private List<Medication> medications;
@JsonFormat(pattern = "dd-MM-yyyy HH:mm")
@DateTimeFormat(pattern = "dd-MM-yyyy HH:mm")
@Column(nullable = false)
private LocalDateTime beginningDate;
@Column(nullable = false)
Expand Down

0 comments on commit d3a9f22

Please sign in to comment.