|
1 | 1 | package br.com.sigaBemApi.DTO.Request; |
2 | 2 |
|
3 | | -import javax.persistence.Entity; |
4 | | -import javax.validation.constraints.NotEmpty; |
5 | | -import javax.validation.constraints.Size; |
6 | | -import java.time.LocalDate; |
7 | 3 |
|
8 | | -@Entity |
9 | | -public class Carga { |
10 | | - @javax.persistence.Id |
11 | | - private Long Id; |
12 | | - |
13 | | - @NotEmpty(message = "Campo com preenchimento obrigatório!") |
14 | | - @Size(max = 55, message = "Nome deve conter menos de 55 caracteres!") |
15 | | - private String nomeDestinatario; |
16 | | - |
17 | | - @NotEmpty(message = "Campo com preenchimento obrigatório!") |
18 | | - @Size(min = 8, max = 8, message = "CEP deve conter 8 digitos!") |
19 | | - private String cepOrigem; |
20 | | - |
21 | | - @NotEmpty(message = "Campo com preenchimento obrigatório!") |
22 | | - @Size(min = 8, max = 8, message = "CEP deve conter 8 digitos!") |
23 | | - private String cepDestino; |
24 | | - |
25 | | - @NotEmpty(message = "Campo com preenchimento obrigatório!") |
26 | | - @Size(min = 0, message = "Peso deve ser maior que zero!") |
27 | | - public Double peso; |
28 | | - |
29 | | - public Double vlTotalFrete; |
30 | | - |
31 | | - public LocalDate dataPrevistaEntrega; |
32 | | - |
33 | | - public LocalDate dataConsulta; |
34 | | - |
35 | | - |
36 | | - public Carga() { |
37 | | - |
38 | | - } |
39 | | - // |
40 | | - public Carga(String cepOrigem, String cepDestino, LocalDate dataPrevistaEntrega, Double vlTotalFrete) { |
41 | | - this.cepOrigem = cepOrigem; |
42 | | - this.cepDestino = cepDestino; |
43 | | - this.dataPrevistaEntrega = dataPrevistaEntrega; |
44 | | - this.vlTotalFrete = vlTotalFrete; |
45 | | - } |
46 | | - |
47 | | - public Long getId() { |
48 | | - return Id; |
49 | | - } |
50 | | - |
51 | | - public void setId(Long id) { |
52 | | - Id = id; |
53 | | - } |
54 | | - |
55 | | - public String getNomeDestinatario() { |
56 | | - return nomeDestinatario; |
57 | | - } |
58 | | - |
59 | | - public void setNomeDestinatario(String nomeDestinatario) { |
60 | | - this.nomeDestinatario = nomeDestinatario; |
61 | | - } |
62 | | - |
63 | | - public String getCepOrigem() { |
64 | | - return cepOrigem; |
65 | | - } |
66 | | - |
67 | | - public void setCepOrigem(String cepOrigem) { |
68 | | - this.cepOrigem = cepOrigem; |
69 | | - } |
70 | | - |
71 | | - public String getCepDestino() { |
72 | | - return cepDestino; |
73 | | - } |
74 | | - |
75 | | - public void setCepDestino(String cepDestino) { |
76 | | - this.cepDestino = cepDestino; |
77 | | - } |
78 | | - |
79 | | - public Double getPeso() { |
80 | | - return peso; |
81 | | - } |
82 | | - |
83 | | - public void setPeso(Double peso) { |
84 | | - this.peso = peso; |
85 | | - } |
86 | | - |
87 | | - public Double getVlTotalFrete() { |
88 | | - return vlTotalFrete; |
89 | | - } |
90 | | - |
91 | | - public void setVlTotalFrete(Double vlTotalFrete) { |
92 | | - this.vlTotalFrete = vlTotalFrete; |
93 | | - } |
94 | | - |
95 | | - public LocalDate getDataPrevistaEntrega() { |
96 | | - return dataPrevistaEntrega; |
97 | | - } |
98 | | - |
99 | | - public void setDataPrevistaEntrega(LocalDate dataPrevistaEntrega) { |
100 | | - this.dataPrevistaEntrega = dataPrevistaEntrega; |
101 | | - } |
102 | | - |
103 | | - public LocalDate getDataConsulta() { |
104 | | - return dataConsulta; |
105 | | - } |
106 | | - |
107 | | - public void setDataConsulta(LocalDate dataConsulta) { |
108 | | - this.dataConsulta = dataConsulta; |
109 | | - } |
110 | | -} |
0 commit comments