Rev 195 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 195 | Rev 693 | ||
|---|---|---|---|
| Line 24... | Line 24... | ||
| 24 | import br.com.ec.core.interfaces.Cadastrar; |
24 | import br.com.ec.core.interfaces.Cadastrar; |
| 25 | import br.com.ec.core.util.DataUtils; |
25 | import br.com.ec.core.util.DataUtils; |
| 26 | import br.com.ec.core.util.StringUtil; |
26 | import br.com.ec.core.util.StringUtil; |
| 27 | import br.com.ec.core.util.VerificadorUtil; |
27 | import br.com.ec.core.util.VerificadorUtil; |
| 28 | import br.com.ec.domain.model.tipos.TipoCupom; |
28 | import br.com.ec.domain.model.tipos.TipoCupom; |
| - | 29 | import br.com.ec.domain.model.tipos.TipoRegraCupom; |
|
| 29 | 30 | ||
| 30 | @Entity |
31 | @Entity |
| 31 | @Table(name="sec_cupom", schema="sc_sec") |
32 | @Table(name="sec_cupom", schema="sc_sec") |
| 32 | public class Cupom implements Serializable, Cloneable { |
33 | public class Cupom implements Serializable, Cloneable { |
| 33 | 34 | ||
| Line 36... | Line 37... | ||
| 36 | private Long sequencial; |
37 | private Long sequencial; |
| 37 | private String codigo; |
38 | private String codigo; |
| 38 | private String descricao; |
39 | private String descricao; |
| 39 | private String observacao; |
40 | private String observacao; |
| 40 | private String tipoCupom; |
41 | private String tipoCupom; |
| - | 42 | private String tipoRegraCupom; |
|
| 41 | private Double valor; |
43 | private Double valor; |
| 42 | private Double percentual; |
44 | private Double percentual; |
| 43 | private Integer quantidadeUtilizada; |
45 | private Integer quantidadeUtilizada; |
| 44 | private Date dataHoraUtilizado; |
46 | private Date dataHoraUtilizado; |
| 45 | private Date dataHoraValidade; |
47 | private Date dataHoraValidade; |
| Line 106... | Line 108... | ||
| 106 | this.tipoCupom = tipoCupom; |
108 | this.tipoCupom = tipoCupom; |
| 107 | }
|
109 | }
|
| 108 | @Transient |
110 | @Transient |
| 109 | public String getDescricaoDoTipoCupom() { |
111 | public String getDescricaoDoTipoCupom() { |
| 110 | return VerificadorUtil.naoEstaNulo(tipoCupom)? TipoCupom.parse(tipoCupom).getDescricao() : ""; |
112 | return VerificadorUtil.naoEstaNulo(tipoCupom)? TipoCupom.parse(tipoCupom).getDescricao() : ""; |
| - | 113 | }
|
|
| - | 114 | ||
| - | 115 | @Column(name="tip_regracupom", nullable=true) |
|
| - | 116 | public String getTipoRegraCupom() { |
|
| - | 117 | return tipoRegraCupom; |
|
| - | 118 | }
|
|
| - | 119 | public void setTipoRegraCupom(String tipoRegraCupom) { |
|
| - | 120 | this.tipoRegraCupom = tipoRegraCupom; |
|
| - | 121 | }
|
|
| - | 122 | @Transient |
|
| - | 123 | public String getDescricaoDoTipoRegraCupom() { |
|
| - | 124 | return VerificadorUtil.naoEstaNulo(tipoRegraCupom)? TipoRegraCupom.parse(tipoRegraCupom).getDescricao() : ""; |
|
| 111 | }
|
125 | }
|
| 112 | 126 | ||
| 113 | @Column(name="val_cupom") |
127 | @Column(name="val_cupom") |
| 114 | public Double getValor() { |
128 | public Double getValor() { |
| 115 | return valor; |
129 | return valor; |