Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 760 | blopes | 1 | package br.com.ec.controller; |
| 2 | |||
| 3 | import java.time.LocalDateTime; |
||
| 4 | import java.time.ZoneId; |
||
| 5 | import java.util.Date; |
||
| 6 | |||
| 7 | public class TradeDTO { |
||
| 8 | |||
| 9 | private Date dataHora; |
||
| 10 | private String ativo; |
||
| 11 | private String direcao; |
||
| 12 | private int quantidade; |
||
| 13 | private double precoEntrada; |
||
| 14 | private double precoSaida; |
||
| 15 | private double pl; |
||
| 16 | |||
| 17 | public TradeDTO() {} |
||
| 18 | |||
| 19 | public TradeDTO(LocalDateTime dataHora, String ativo, String direcao, |
||
| 20 | int quantidade, double precoEntrada, double precoSaida, double pl) { |
||
| 21 | this.dataHora = Date.from( |
||
| 22 | dataHora.atZone(ZoneId.systemDefault()).toInstant() |
||
| 23 | ); |
||
| 24 | this.ativo = ativo; |
||
| 25 | this.direcao = direcao; |
||
| 26 | this.quantidade = quantidade; |
||
| 27 | this.precoEntrada = precoEntrada; |
||
| 28 | this.precoSaida = precoSaida; |
||
| 29 | this.pl = pl; |
||
| 30 | } |
||
| 31 | |||
| 32 | public Date getDataHora() { |
||
| 33 | return dataHora; |
||
| 34 | } |
||
| 35 | |||
| 36 | public void setDataHora(Date dataHora) { |
||
| 37 | this.dataHora = dataHora; |
||
| 38 | } |
||
| 39 | |||
| 40 | public String getAtivo() { |
||
| 41 | return ativo; |
||
| 42 | } |
||
| 43 | |||
| 44 | public void setAtivo(String ativo) { |
||
| 45 | this.ativo = ativo; |
||
| 46 | } |
||
| 47 | |||
| 48 | public String getDirecao() { |
||
| 49 | return direcao; |
||
| 50 | } |
||
| 51 | |||
| 52 | public void setDirecao(String direcao) { |
||
| 53 | this.direcao = direcao; |
||
| 54 | } |
||
| 55 | |||
| 56 | public int getQuantidade() { |
||
| 57 | return quantidade; |
||
| 58 | } |
||
| 59 | |||
| 60 | public void setQuantidade(int quantidade) { |
||
| 61 | this.quantidade = quantidade; |
||
| 62 | } |
||
| 63 | |||
| 64 | public double getPrecoEntrada() { |
||
| 65 | return precoEntrada; |
||
| 66 | } |
||
| 67 | |||
| 68 | public void setPrecoEntrada(double precoEntrada) { |
||
| 69 | this.precoEntrada = precoEntrada; |
||
| 70 | } |
||
| 71 | |||
| 72 | public double getPrecoSaida() { |
||
| 73 | return precoSaida; |
||
| 74 | } |
||
| 75 | |||
| 76 | public void setPrecoSaida(double precoSaida) { |
||
| 77 | this.precoSaida = precoSaida; |
||
| 78 | } |
||
| 79 | |||
| 80 | public double getPl() { |
||
| 81 | return pl; |
||
| 82 | } |
||
| 83 | |||
| 84 | public void setPl(double pl) { |
||
| 85 | this.pl = pl; |
||
| 86 | } |
||
| 87 | |||
| 88 | } |