Skip to content

Commit

Permalink
Push new regeneration (Test)
Browse files Browse the repository at this point in the history
  • Loading branch information
sayoungestguy committed Sep 6, 2024
1 parent 4fac193 commit 0b95799
Show file tree
Hide file tree
Showing 40 changed files with 206 additions and 281 deletions.
12 changes: 6 additions & 6 deletions .jhipster/Activity.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
"dto": "mapstruct",
"enableAudit": true,
"fields": [
{
"fieldName": "activityName",
"fieldType": "String",
"fieldValidateRules": ["maxlength"],
"fieldValidateRulesMaxlength": "255"
},
{
"fieldName": "activityTime",
"fieldType": "Instant",
Expand Down Expand Up @@ -59,12 +65,6 @@
"fieldType": "Instant",
"nullable": false,
"readonly": true
},
{
"fieldName": "activityName",
"fieldType": "String",
"fieldValidateRules": ["required", "maxlength"],
"fieldValidateRulesMaxlength": "255"
}
],
"name": "Activity",
Expand Down
17 changes: 5 additions & 12 deletions .jhipster/UserSkill.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,33 @@
"annotations": {
"changelogDate": "20240905014534"
},
"applications": ["scaleup"],
"dto": "mapstruct",
"fields": [
{
"fieldName": "experience",
"fieldName": "yearsOfExperience",
"fieldType": "Integer",
"fieldValidateRules": ["required", "min", "max"],
"fieldValidateRulesMax": "100",
"fieldValidateRulesMin": "0"
"fieldValidateRules": ["required"]
}
],
"jpaMetamodelFiltering": false,
"name": "UserSkill",
"pagination": "infinite-scroll",
"readOnly": false,
"relationships": [
{
"otherEntityField": "id",
"otherEntityName": "userProfile",
"relationshipName": "userProfile",
"relationshipSide": "left",
"relationshipType": "many-to-one",
"relationshipValidateRules": []
"relationshipType": "many-to-one"
},
{
"otherEntityField": "id",
"otherEntityName": "skill",
"relationshipName": "skill",
"relationshipSide": "left",
"relationshipType": "many-to-one"
},
{
"otherEntityField": "id",
"otherEntityName": "codeTables",
"relationshipName": "codeTables",
"relationshipName": "skillType",
"relationshipSide": "left",
"relationshipType": "many-to-one"
}
Expand Down
2 changes: 0 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@
<sonar-maven-plugin.version>4.0.0.4121</sonar-maven-plugin.version>
<spotless-maven-plugin.version>2.43.0</spotless-maven-plugin.version>
<springdoc-openapi-starter-webmvc-api.version>2.5.0</springdoc-openapi-starter-webmvc-api.version>
<sonar.organization>sayoungestguy</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
</properties>

<dependencies>
Expand Down
37 changes: 18 additions & 19 deletions src/main/java/com/teamsixnus/scaleup/domain/Activity.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ public class Activity extends AbstractAuditingEntity<Long> implements Serializab
@Column(name = "id")
private Long id;

@Size(max = 255)
@Column(name = "activity_name", length = 255)
private String activityName;

@NotNull
@Column(name = "activity_time", nullable = false)
private Instant activityTime;
Expand All @@ -45,11 +49,6 @@ public class Activity extends AbstractAuditingEntity<Long> implements Serializab
// Inherited createdDate definition
// Inherited lastModifiedBy definition
// Inherited lastModifiedDate definition
@NotNull
@Size(max = 255)
@Column(name = "activity_name", length = 255, nullable = false)
private String activityName;

@Transient
private boolean isPersisted;

Expand All @@ -75,6 +74,19 @@ public void setId(Long id) {
this.id = id;
}

public String getActivityName() {
return this.activityName;
}

public Activity activityName(String activityName) {
this.setActivityName(activityName);
return this;
}

public void setActivityName(String activityName) {
this.activityName = activityName;
}

public Instant getActivityTime() {
return this.activityTime;
}
Expand Down Expand Up @@ -151,19 +163,6 @@ public Activity lastModifiedDate(Instant lastModifiedDate) {
return this;
}

public String getActivityName() {
return this.activityName;
}

public Activity activityName(String activityName) {
this.setActivityName(activityName);
return this;
}

public void setActivityName(String activityName) {
this.activityName = activityName;
}

@PostLoad
@PostPersist
public void updateEntityState() {
Expand Down Expand Up @@ -231,6 +230,7 @@ public int hashCode() {
public String toString() {
return "Activity{" +
"id=" + getId() +
", activityName='" + getActivityName() + "'" +
", activityTime='" + getActivityTime() + "'" +
", duration=" + getDuration() +
", venue='" + getVenue() + "'" +
Expand All @@ -239,7 +239,6 @@ public String toString() {
", createdDate='" + getCreatedDate() + "'" +
", lastModifiedBy='" + getLastModifiedBy() + "'" +
", lastModifiedDate='" + getLastModifiedDate() + "'" +
", activityName='" + getActivityName() + "'" +
"}";
}
}
34 changes: 16 additions & 18 deletions src/main/java/com/teamsixnus/scaleup/domain/UserSkill.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ public class UserSkill implements Serializable {
private Long id;

@NotNull
@Min(value = 0)
@Max(value = 100)
@Column(name = "experience", nullable = false)
private Integer experience;
@Column(name = "years_of_experience", nullable = false)
private Integer yearsOfExperience;

@ManyToOne(fetch = FetchType.LAZY)
@JsonIgnoreProperties(value = { "user" }, allowSetters = true)
Expand All @@ -37,7 +35,7 @@ public class UserSkill implements Serializable {
private Skill skill;

@ManyToOne(fetch = FetchType.LAZY)
private CodeTables codeTables;
private CodeTables skillType;

// jhipster-needle-entity-add-field - JHipster will add fields here

Expand All @@ -54,17 +52,17 @@ public void setId(Long id) {
this.id = id;
}

public Integer getExperience() {
return this.experience;
public Integer getYearsOfExperience() {
return this.yearsOfExperience;
}

public UserSkill experience(Integer experience) {
this.setExperience(experience);
public UserSkill yearsOfExperience(Integer yearsOfExperience) {
this.setYearsOfExperience(yearsOfExperience);
return this;
}

public void setExperience(Integer experience) {
this.experience = experience;
public void setYearsOfExperience(Integer yearsOfExperience) {
this.yearsOfExperience = yearsOfExperience;
}

public UserProfile getUserProfile() {
Expand Down Expand Up @@ -93,16 +91,16 @@ public UserSkill skill(Skill skill) {
return this;
}

public CodeTables getCodeTables() {
return this.codeTables;
public CodeTables getSkillType() {
return this.skillType;
}

public void setCodeTables(CodeTables codeTables) {
this.codeTables = codeTables;
public void setSkillType(CodeTables codeTables) {
this.skillType = codeTables;
}

public UserSkill codeTables(CodeTables codeTables) {
this.setCodeTables(codeTables);
public UserSkill skillType(CodeTables codeTables) {
this.setSkillType(codeTables);
return this;
}

Expand Down Expand Up @@ -130,7 +128,7 @@ public int hashCode() {
public String toString() {
return "UserSkill{" +
"id=" + getId() +
", experience=" + getExperience() +
", yearsOfExperience=" + getYearsOfExperience() +
"}";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,7 @@ private void sendEmailSync(String to, String subject, String content, boolean is
try {
MimeMessageHelper message = new MimeMessageHelper(mimeMessage, isMultipart, StandardCharsets.UTF_8.name());
message.setTo(to);
// message.setFrom(jHipsterProperties.getMail().getFrom());
String SenderMail = "MS_hwQpFm@trial-k68zxl2o29egj905.mlsender.net";
message.setFrom(SenderMail);
message.setFrom(jHipsterProperties.getMail().getFrom());
message.setSubject(subject);
message.setText(content, isHtml);
javaMailSender.send(mimeMessage);
Expand Down
25 changes: 12 additions & 13 deletions src/main/java/com/teamsixnus/scaleup/service/dto/ActivityDTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ public class ActivityDTO implements Serializable {

private Long id;

@Size(max = 255)
private String activityName;

@NotNull
private Instant activityTime;

Expand All @@ -33,10 +36,6 @@ public class ActivityDTO implements Serializable {

private Instant lastModifiedDate;

@NotNull
@Size(max = 255)
private String activityName;

private UserProfileDTO creatorProfile;

private SkillDTO skill;
Expand All @@ -49,6 +48,14 @@ public void setId(Long id) {
this.id = id;
}

public String getActivityName() {
return activityName;
}

public void setActivityName(String activityName) {
this.activityName = activityName;
}

public Instant getActivityTime() {
return activityTime;
}
Expand Down Expand Up @@ -113,14 +120,6 @@ public void setLastModifiedDate(Instant lastModifiedDate) {
this.lastModifiedDate = lastModifiedDate;
}

public String getActivityName() {
return activityName;
}

public void setActivityName(String activityName) {
this.activityName = activityName;
}

public UserProfileDTO getCreatorProfile() {
return creatorProfile;
}
Expand Down Expand Up @@ -163,6 +162,7 @@ public int hashCode() {
public String toString() {
return "ActivityDTO{" +
"id=" + getId() +
", activityName='" + getActivityName() + "'" +
", activityTime='" + getActivityTime() + "'" +
", duration=" + getDuration() +
", venue='" + getVenue() + "'" +
Expand All @@ -171,7 +171,6 @@ public String toString() {
", createdDate='" + getCreatedDate() + "'" +
", lastModifiedBy='" + getLastModifiedBy() + "'" +
", lastModifiedDate='" + getLastModifiedDate() + "'" +
", activityName='" + getActivityName() + "'" +
", creatorProfile=" + getCreatorProfile() +
", skill=" + getSkill() +
"}";
Expand Down
26 changes: 12 additions & 14 deletions src/main/java/com/teamsixnus/scaleup/service/dto/UserSkillDTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,13 @@ public class UserSkillDTO implements Serializable {
private Long id;

@NotNull
@Min(value = 0)
@Max(value = 100)
private Integer experience;
private Integer yearsOfExperience;

private UserProfileDTO userProfile;

private SkillDTO skill;

private CodeTablesDTO codeTables;
private CodeTablesDTO skillType;

public Long getId() {
return id;
Expand All @@ -31,12 +29,12 @@ public void setId(Long id) {
this.id = id;
}

public Integer getExperience() {
return experience;
public Integer getYearsOfExperience() {
return yearsOfExperience;
}

public void setExperience(Integer experience) {
this.experience = experience;
public void setYearsOfExperience(Integer yearsOfExperience) {
this.yearsOfExperience = yearsOfExperience;
}

public UserProfileDTO getUserProfile() {
Expand All @@ -55,12 +53,12 @@ public void setSkill(SkillDTO skill) {
this.skill = skill;
}

public CodeTablesDTO getCodeTables() {
return codeTables;
public CodeTablesDTO getSkillType() {
return skillType;
}

public void setCodeTables(CodeTablesDTO codeTables) {
this.codeTables = codeTables;
public void setSkillType(CodeTablesDTO skillType) {
this.skillType = skillType;
}

@Override
Expand Down Expand Up @@ -89,10 +87,10 @@ public int hashCode() {
public String toString() {
return "UserSkillDTO{" +
"id=" + getId() +
", experience=" + getExperience() +
", yearsOfExperience=" + getYearsOfExperience() +
", userProfile=" + getUserProfile() +
", skill=" + getSkill() +
", codeTables=" + getCodeTables() +
", skillType=" + getSkillType() +
"}";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
public interface UserSkillMapper extends EntityMapper<UserSkillDTO, UserSkill> {
@Mapping(target = "userProfile", source = "userProfile", qualifiedByName = "userProfileId")
@Mapping(target = "skill", source = "skill", qualifiedByName = "skillId")
@Mapping(target = "codeTables", source = "codeTables", qualifiedByName = "codeTablesId")
@Mapping(target = "skillType", source = "skillType", qualifiedByName = "codeTablesId")
UserSkillDTO toDto(UserSkill s);

@Named("userProfileId")
Expand Down
3 changes: 1 addition & 2 deletions src/main/resources/.h2.server.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#H2 Server Properties
#Thu Aug 29 00:36:11 SGT 2024
0=JHipster H2 (Disk)|org.h2.Driver|jdbc\:h2\:file\:./target/h2db/db/scaleup|scaleup
webSSL=false
webAllowOthers=true
webPort=8092
webSSL=false
Loading

0 comments on commit 0b95799

Please sign in to comment.