-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔀 Merge pull request #9 from FusionTech-2430/develop
🚀 Release v1.0
- Loading branch information
Showing
18 changed files
with
409 additions
and
107 deletions.
There are no files selected for viewing
18 changes: 0 additions & 18 deletions
18
src/main/java/co/allconnected/fussiontech/productsservice/config/WebConfig.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
src/main/java/co/allconnected/fussiontech/productsservice/dtos/ProductCreateDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
package co.allconnected.fussiontech.productsservice.dtos; | ||
|
||
public record ProductCreateDTO (String idBusiness, String name, String description, int stock, float price, String status ){ | ||
import java.util.UUID; | ||
|
||
public record ProductCreateDTO (UUID idBusiness, String name, String description, Integer stock, Double price, String status) { | ||
} |
4 changes: 4 additions & 0 deletions
4
src/main/java/co/allconnected/fussiontech/productsservice/dtos/RatingCreateDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package co.allconnected.fussiontech.productsservice.dtos; | ||
|
||
public record RatingCreateDTO(Integer productId, String userId, Integer rating, String comment) { | ||
} |
18 changes: 16 additions & 2 deletions
18
src/main/java/co/allconnected/fussiontech/productsservice/dtos/RatingDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,29 @@ | ||
package co.allconnected.fussiontech.productsservice.dtos; | ||
|
||
import co.allconnected.fussiontech.productsservice.model.Rating; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
import java.io.Serializable; | ||
import java.time.Instant; | ||
|
||
@Getter | ||
@Setter | ||
@NoArgsConstructor | ||
public class RatingDTO implements Serializable { | ||
private Integer idRating; | ||
private Integer productId; | ||
private Integer userId; | ||
private String userId; | ||
private Integer rating; | ||
private String comment; | ||
private String date; | ||
private Instant date; | ||
|
||
public RatingDTO(Rating rating){ | ||
this.idRating = rating.getId(); | ||
this.productId = rating.getIdProduct().getId(); | ||
this.userId = rating.getIdUser(); | ||
this.rating = rating.getRating(); | ||
this.comment = rating.getComment(); | ||
this.date = rating.getDate(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/main/java/co/allconnected/fussiontech/productsservice/model/ProductLabel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package co.allconnected.fussiontech.productsservice.model; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
@Entity | ||
@Table(name = "product_label", schema = "all_connected_products") | ||
public class ProductLabel { | ||
@EmbeddedId | ||
private ProductLabelId id; | ||
|
||
@MapsId("idAnnouncement") | ||
@ManyToOne(fetch = FetchType.LAZY, optional = false) | ||
@JoinColumn(name = "id_announcement", nullable = false) | ||
private Product idAnnouncement; | ||
|
||
@MapsId("idLabel") | ||
@ManyToOne(fetch = FetchType.LAZY, optional = false) | ||
@JoinColumn(name = "id_label", nullable = false) | ||
private Label idLabel; | ||
|
||
} |
Oops, something went wrong.