pleins de trucs
This commit is contained in:
parent
887090bf49
commit
101e5a5ddb
@ -46,4 +46,6 @@ public class Instance {
|
||||
this.user = user;
|
||||
this.tp = tp;
|
||||
}
|
||||
|
||||
public Instance() {}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package fr.la_banquise.backend.data.model;
|
||||
|
||||
import io.quarkus.hibernate.orm.panache.PanacheEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
@ -9,7 +9,6 @@ import jakarta.persistence.JoinColumn;
|
||||
import jakarta.persistence.ManyToOne;
|
||||
import jakarta.persistence.SequenceGenerator;
|
||||
import jakarta.persistence.Table;
|
||||
import java.util.List;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@ -28,7 +27,7 @@ public class Ji {
|
||||
public String respo;
|
||||
public String date;
|
||||
|
||||
@ManyToOne @JoinColumn(name = "site_id") public Site site;
|
||||
@ManyToOne @JoinColumn(name = "site_id") @JsonIgnore public Site site;
|
||||
|
||||
public Ji(String name, String description, String respo, String date,
|
||||
Site site) {
|
||||
@ -38,4 +37,6 @@ public class Ji {
|
||||
this.date = date;
|
||||
this.site = site;
|
||||
}
|
||||
|
||||
public Ji() {}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package fr.la_banquise.backend.data.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
@ -30,7 +31,7 @@ public class Site {
|
||||
public String description;
|
||||
public String address;
|
||||
|
||||
@OneToMany(mappedBy = "site") public List<Ji> jiInSite;
|
||||
@OneToMany(mappedBy = "site") @JsonIgnore public List<Ji> jiInSite;
|
||||
|
||||
public Site(String name, String description, String address) {
|
||||
this.name = name;
|
||||
@ -44,4 +45,6 @@ public class Site {
|
||||
return "Site{id=" + id + ", name='" + name + "', description='" +
|
||||
description + "', address='" + address + "'}";
|
||||
}
|
||||
|
||||
public Site() {}
|
||||
}
|
||||
|
@ -36,4 +36,6 @@ public class Tp {
|
||||
this.respo = respo;
|
||||
this.date = date;
|
||||
}
|
||||
|
||||
public Tp() {}
|
||||
}
|
||||
|
@ -50,4 +50,6 @@ public class User {
|
||||
this.role = role;
|
||||
this.instances = instances;
|
||||
}
|
||||
|
||||
public User() {}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ import lombok.AllArgsConstructor;
|
||||
/**
|
||||
* PracticalResponse
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
//@AllArgsConstructor
|
||||
@RegisterForReflection
|
||||
public class PracticalResponse {
|
||||
public String name;
|
||||
@ -16,12 +16,24 @@ public class PracticalResponse {
|
||||
public String respo;
|
||||
public String endDate;
|
||||
|
||||
@Nullable
|
||||
public String instanceName;
|
||||
@Nullable
|
||||
public String pwd;
|
||||
@Nullable
|
||||
public String ssh;
|
||||
@Nullable
|
||||
public Long port;
|
||||
@Nullable public String instanceName;
|
||||
@Nullable public String pwd;
|
||||
@Nullable public String ssh;
|
||||
@Nullable public Long port;
|
||||
|
||||
public PracticalResponse(String name, String description, String pdfLink,
|
||||
String respo, String date,
|
||||
@Nullable String InstanceName,
|
||||
@Nullable String pwd, @Nullable String ssh,
|
||||
@Nullable Long port) {
|
||||
this.name = name;
|
||||
this.endDate = date;
|
||||
this.description = description;
|
||||
this.pdfLink = pdfLink;
|
||||
this.respo = respo;
|
||||
this.instanceName = InstanceName;
|
||||
this.port = port;
|
||||
this.ssh = ssh;
|
||||
this.pwd = pwd;
|
||||
}
|
||||
}
|
||||
|
@ -55,19 +55,19 @@ public class TpService {
|
||||
return res;
|
||||
}
|
||||
|
||||
public PracticalResponse getTpAdmin(Long id) {
|
||||
/* public PracticalResponse getTpAdmin(Long id) {
|
||||
Tp tp = tpRepository.findById(id);
|
||||
return new PracticalResponse(tp.name, tp.description, tp.pdfLink, tp.respo, tp.date,
|
||||
return new PracticalResponse(tp.name, tp.description, tp.pdfLink, tp.respo,
|
||||
"",
|
||||
"", "", 0L);
|
||||
}
|
||||
}*/
|
||||
|
||||
@Transactional
|
||||
/*@Transactional
|
||||
public Tp createTp(TpRequest requestTp) {
|
||||
Tp tp = new Tp(requestTp.title, requestTp.description, requestTp.pdf, security.getUserPrincipal().getName(), requestTp.date);
|
||||
tpRepository.persist(tp);
|
||||
return tp;
|
||||
}
|
||||
}*/
|
||||
|
||||
@Transactional
|
||||
public void deleteTp(Long id) {
|
||||
|
@ -28,7 +28,7 @@ quarkus.security.ldap.identity-mapping.attribute-mappings."0".filter-base-dn=ou=
|
||||
quarkus.datasource.db-kind = postgresql
|
||||
quarkus.datasource.username = banq
|
||||
quarkus.datasource.password = test
|
||||
quarkus.datasource.jdbc.url = jdbc:postgresql://localhost:5432/quarkus
|
||||
#quarkus.datasource.jdbc.url = jdbc:postgresql://localhost:5432/quarkus
|
||||
|
||||
# drop and create the database at startup (use `update` to only update the schema)drop-and-create
|
||||
#quarkus.hibernate-orm.database.generation=update
|
||||
|
Loading…
x
Reference in New Issue
Block a user