Done ticket GEPAFINBE-3
This commit is contained in:
@@ -1,38 +0,0 @@
|
||||
package net.gepafin.tendermanagement.model;
|
||||
|
||||
public class User {
|
||||
private Long id;
|
||||
private String name;
|
||||
private String email;
|
||||
|
||||
public User() {}
|
||||
|
||||
public User(Long id, String name, String email) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.email = email;
|
||||
}
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package net.gepafin.tendermanagement.model.request;
|
||||
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class RegionReq {
|
||||
|
||||
private String regionName;
|
||||
|
||||
private String description;
|
||||
|
||||
private String country;
|
||||
|
||||
private String status;
|
||||
|
||||
private String priorityArea;
|
||||
|
||||
private Long population;
|
||||
|
||||
private BigDecimal areaSize;
|
||||
|
||||
private BigDecimal gdp;
|
||||
|
||||
private BigDecimal unemploymentRate;
|
||||
|
||||
private BigDecimal infrastructureScore;
|
||||
|
||||
private BigDecimal educationLevel;
|
||||
|
||||
private BigDecimal healthcareAccess;
|
||||
|
||||
private BigDecimal environmentalScore;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package net.gepafin.tendermanagement.model.request;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class RoleReq {
|
||||
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private Long id;
|
||||
|
||||
private String roleName;
|
||||
|
||||
private String description;
|
||||
|
||||
private String permissions;
|
||||
|
||||
private String status;
|
||||
|
||||
private Long regionId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package net.gepafin.tendermanagement.model.request;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class UpdateRegionReq {
|
||||
private String regionName;
|
||||
|
||||
private String description;
|
||||
|
||||
private String country;
|
||||
|
||||
private String status;
|
||||
|
||||
private String priorityArea;
|
||||
|
||||
private Long population;
|
||||
|
||||
private Double areaSize;
|
||||
|
||||
private Double gdp;
|
||||
|
||||
private Double unemploymentRate;
|
||||
|
||||
private Double infrastructureScore;
|
||||
|
||||
private Double educationLevel;
|
||||
|
||||
private Double healthcareAccess;
|
||||
|
||||
private Double environmentalScore;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package net.gepafin.tendermanagement.model.request;
|
||||
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class UpdateUserReq {
|
||||
|
||||
private String firstName;
|
||||
private String lastName;
|
||||
private String phoneNumber;
|
||||
private Long roleId;
|
||||
private String organization;
|
||||
private String address;
|
||||
private String city;
|
||||
private String status;
|
||||
private String country;
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package net.gepafin.tendermanagement.model.request;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import jakarta.validation.constraints.Email;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class UserReq {
|
||||
|
||||
|
||||
private String password;
|
||||
|
||||
private String confPassword;
|
||||
|
||||
private String email;
|
||||
|
||||
private String firstName;
|
||||
|
||||
private String lastName;
|
||||
|
||||
private String phoneNumber;
|
||||
|
||||
private Long roleId;
|
||||
|
||||
private String organization;
|
||||
|
||||
private String address;
|
||||
|
||||
private String city;
|
||||
|
||||
private String country;
|
||||
|
||||
private String status;
|
||||
|
||||
private LocalDateTime lastLogin;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package net.gepafin.tendermanagement.model.response;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class RegionResponseBean {
|
||||
private Long id;
|
||||
private String regionName;
|
||||
private String description;
|
||||
private String country;
|
||||
private String status;
|
||||
private String priorityArea;
|
||||
private Long population;
|
||||
private BigDecimal areaSize;
|
||||
private BigDecimal gdp;
|
||||
private BigDecimal unemploymentRate;
|
||||
private BigDecimal infrastructureScore;
|
||||
private BigDecimal educationLevel;
|
||||
private BigDecimal healthcareAccess;
|
||||
private BigDecimal environmentalScore;
|
||||
private LocalDateTime createdDate;
|
||||
private LocalDateTime updatedDate;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package net.gepafin.tendermanagement.model.response;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import net.gepafin.tendermanagement.entities.RegionEntity;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class RoleResponseBean {
|
||||
private Long id;
|
||||
private String roleName;
|
||||
private String description;
|
||||
private LocalDateTime createdDate;
|
||||
private LocalDateTime updatedDate;
|
||||
private String permissions;
|
||||
private RegionEntity region;
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package net.gepafin.tendermanagement.model.response;
|
||||
|
||||
import jakarta.validation.constraints.Email;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import net.gepafin.tendermanagement.entities.RoleEntity;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class UserResponseBean {
|
||||
private Long id;
|
||||
private String email;
|
||||
|
||||
private String firstName;
|
||||
|
||||
private String lastName;
|
||||
|
||||
private String phoneNumber;
|
||||
|
||||
private RoleEntity role;
|
||||
|
||||
private String organization;
|
||||
|
||||
private String address;
|
||||
|
||||
private String city;
|
||||
|
||||
private String country;
|
||||
|
||||
private String status;
|
||||
|
||||
private LocalDateTime lastLogin;
|
||||
|
||||
private LocalDateTime createdDate;
|
||||
|
||||
private LocalDateTime updatedDate;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package net.gepafin.tendermanagement.model.util;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import net.gepafin.tendermanagement.web.rest.api.errors.Status;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* A generic response class used for API responses.
|
||||
*
|
||||
* @param <T> the type of the response data
|
||||
*/
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class Response<T> implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private T data; // The response data
|
||||
private Status status; // The status of the response
|
||||
private String message; // Additional message or error description
|
||||
}
|
||||
Reference in New Issue
Block a user