Skip to content

Commit

Permalink
fixed isActive on Application Environment endpoint.
Browse files Browse the repository at this point in the history
  • Loading branch information
vertigo17 committed Dec 21, 2024
1 parent 09b499a commit f958043
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public class CountryEnvironmentParametersDTOV001 {

@JsonView(value = {View.Public.GET.class, View.Public.PATCH.class, View.Public.PUT.class, View.Public.POST.class})
@ApiModelProperty(position = 4)
@JsonProperty("isActive")
private boolean isActive;

@JsonView(value = {View.Public.GET.class, View.Public.PATCH.class, View.Public.PUT.class, View.Public.POST.class})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

import org.cerberus.core.api.mappers.TimestampMapper;
import org.cerberus.core.crud.entity.CountryEnvironmentParameters;
import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

Expand All @@ -35,10 +34,16 @@ public interface CountryEnvironmentParametersMapperV001 {

@Mapping(source = "ip", target = "endPoint")
@Mapping(source = "url", target = "contextRoot")
@Mapping(target = "isActive", ignore = true)
@Mapping(source = "active", target = "isActive")
CountryEnvironmentParametersDTOV001 toDTO(CountryEnvironmentParameters countryEnvironmentParameters);

@InheritInverseConfiguration
@Mapping(target = "isActive", ignore = true)
/**
*
* @param countryEnvironmentParametersDTO
* @return
*/
@Mapping(source = "active", target = "isActive")
@Mapping(source = "endPoint", target = "ip")
@Mapping(source = "contextRoot", target = "url")
CountryEnvironmentParameters toEntity(CountryEnvironmentParametersDTOV001 countryEnvironmentParametersDTO);
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,18 @@
package org.cerberus.core.crud.entity;

import java.sql.Timestamp;
import javax.persistence.Entity;
import javax.persistence.Id;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

/**
* @author bcivel
*/
@Entity
@Getter
@Setter
@Data
@Builder
@EqualsAndHashCode
@AllArgsConstructor
Expand Down

0 comments on commit f958043

Please sign in to comment.