Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arreglado fallos en el csv y en la clase manager #7

Merged
merged 1 commit into from
Feb 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/main/java/acme/realms/Manager.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.Digits;
import javax.validation.constraints.Pattern;

import org.springframework.data.annotation.Transient;
Expand All @@ -27,7 +26,7 @@
import acme.client.components.principals.DefaultUserIdentity;
import acme.client.components.validation.Mandatory;
import acme.client.components.validation.Optional;
import acme.client.components.validation.ValidNumber;
import acme.client.components.validation.ValidMoment;
import acme.client.components.validation.ValidUrl;
import acme.datatypes.UserIdentity;
import lombok.Getter;
Expand All @@ -51,11 +50,11 @@ public class Manager extends AbstractRole {
private String identifierNumber;

@Mandatory
@ValidNumber(min = 0, max = 100, integer = 3, fraction = 0)
@Digits(integer = 3, fraction = 0)
private Integer yearsOfExperience;

@Mandatory
@Temporal(TemporalType.DATE)
@ValidMoment(past = true)
private Date dateOfBirth;

@ValidUrl
Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/WEB-INF/data/sample/manager.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
key,key:userAccount,identifierNumber,yearsOfExperience,dateOfBirth,picture,userIdentity_name,userIdentity_surname,userIdentity_email
manager1,manager1,MA123456,50,1980-05-15,http://www.lorem-ipsum.org,Manager,One,[email protected]
manager2,manager2,MG654321,50,1975-08-20,,Manager,Two,[email protected]
manager3,manager3,MT789012,,,,Manager,Three,[email protected]
key,key:userAccount,identifierNumber,yearsOfExperience,dateOfBirth,picture,userIdentity.name,userIdentity.surname,userIdentity.email
manager1,user-account-manager-01,MA123456,15,2001/05/15 00:00,http://www.lorem-ipsum.org,Manager,One,[email protected]
manager2,user-account-manager-02,MG654321,20,2002/08/20 00:00,,Manager,Two,[email protected]
manager3,user-account-manager-03,MT789012,5,2003/07/10 00:00,,Manager,Three,[email protected]