Skip to content

Commit

Permalink
EntityClinicHistory
Browse files Browse the repository at this point in the history
  • Loading branch information
calderonic committed Sep 3, 2024
1 parent 14da462 commit e72e7be
Showing 1 changed file with 45 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package com.gestor_clinica_veterinaria.VeterinaryHospitalManager.Entity;

import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.List;

@Entity
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "clinic_history")

public class ClinicHistory {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long idClinicHistory;

@ManyToOne
@JoinColumn(name = "pet_id")
private Pet pet;

// @OneToMany(cascade = CascadeType.ALL)
// private List<Consultation> consultations;

@OneToMany(cascade = CascadeType.ALL)
private List<DiagnosticEntity> diagnoses;

@OneToMany(cascade = CascadeType.ALL)
private List<Treatment> treatments;

@OneToMany(cascade = CascadeType.ALL)
private List<Surgery> surgeries;

// @OneToMany(cascade = CascadeType.ALL)
// private List<ComplementaryStudy> complementaryStudies;

// @OneToMany(cascade = CascadeType.ALL)
// private List<Hospitalization> hospitalizations;

}

0 comments on commit e72e7be

Please sign in to comment.