Created
March 26, 2020 23:38
-
-
Save asouza/4c5b27d054dcb99c70c3a3f1b8bb4e09 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
public class CaracteristicaRequest implements CriadorCaracteristica{ | |
new Produto(...., caracteristicasRequest) | |
} | |
public Produto(@NotNull Usuario usuario, | |
@NotNull Categoria categoria, | |
@NotEmpty String nome, | |
@Min(value = 1) BigDecimal valor, | |
@Min(value = 0) int quantidade, | |
@NotEmpty @Length(max = 1000) String descricao, | |
@NotEmpty @Min(value = 1) List<String> urlsFotos, | |
@NotEmpty @Min(value = 1)List<CriadorCaracteristica> caracteristicasProduto) { | |
for(Carac c : cs){ | |
c.criaCaracteristica(this); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment