diff --git a/gym-rest-api/src/main/java/com/example/gym/model/user/ResponseUserDto.java b/gym-rest-api/src/main/java/com/example/gym/model/user/ResponseUserDto.java new file mode 100644 index 0000000..d8d9e93 --- /dev/null +++ b/gym-rest-api/src/main/java/com/example/gym/model/user/ResponseUserDto.java @@ -0,0 +1,36 @@ +package com.example.gym.model.user; + +import java.time.LocalDateTime; +import java.util.List; + +import com.example.gym.model.user.pojo.ClientInfo; +import com.example.gym.model.user.pojo.GenderType; +import com.example.gym.model.user.pojo.TrainerInfo; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +@NoArgsConstructor +@AllArgsConstructor +@Getter +@Setter +public class ResponseUserDto { + + private String id; + private String name; + private String surname; + private String password; + private String email; + private String phoneNumber; + private String comment; + private List roles; + private GenderType gender; + private LocalDateTime birthday; + private TrainerInfo trainerInfo; + private ClientInfo clientInfo; + private LocalDateTime createdAt; + private LocalDateTime updatedAt; + +} diff --git a/gym-rest-api/src/main/java/com/example/gym/model/user/pojo/ClientInfo.java b/gym-rest-api/src/main/java/com/example/gym/model/user/pojo/ClientInfo.java index b9d0644..8684649 100644 --- a/gym-rest-api/src/main/java/com/example/gym/model/user/pojo/ClientInfo.java +++ b/gym-rest-api/src/main/java/com/example/gym/model/user/pojo/ClientInfo.java @@ -17,7 +17,7 @@ public class ClientInfo { @Schema(name = "Баллы лояльности", description = "100") - private Integer loyaltyPoints; + private Integer loyaltyPoints = 0; @ArraySchema( schema = @Schema(name = "Абонементы", implementation = Subscription.class) ) diff --git a/gym-rest-api/src/main/java/com/example/gym/model/user/pojo/GenderType.java b/gym-rest-api/src/main/java/com/example/gym/model/user/pojo/GenderType.java new file mode 100644 index 0000000..2a789fe --- /dev/null +++ b/gym-rest-api/src/main/java/com/example/gym/model/user/pojo/GenderType.java @@ -0,0 +1,5 @@ +package com.example.gym.model.user.pojo; + +public enum GenderType { + MALE, FEMALE +} diff --git a/gym-rest-api/src/main/java/com/example/gym/model/user/pojo/loyaltyPointsEntry.java b/gym-rest-api/src/main/java/com/example/gym/model/user/pojo/loyaltyPointsEntry.java index a054c4a..43abf0f 100644 --- a/gym-rest-api/src/main/java/com/example/gym/model/user/pojo/loyaltyPointsEntry.java +++ b/gym-rest-api/src/main/java/com/example/gym/model/user/pojo/loyaltyPointsEntry.java @@ -2,6 +2,7 @@ import java.time.LocalDateTime; + import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor;