Rev 36147 | Blame | Compare with Previous | Last modification | View Log | RSS feed
package com.spice.profitmandi.dao.entity.transaction;import javax.persistence.*;import java.time.LocalDate;import java.time.LocalDateTime;import java.util.Objects;@Entity@Table(name = "transaction.credit_note", schema = "transaction")public class CreditNote {@Id@Column(name = "id")@GeneratedValue(strategy = GenerationType.IDENTITY)private int id;@Column(name = "fofo_id")private int fofoId;@Column(name = "cn_number")private String creditNoteNumber;@Column(name = "cn_date")private LocalDateTime cnDate;@Enumerated(EnumType.STRING)@Column(name = "cn_type")private CreditNoteType type;@Column(name = "create_timestamp")private LocalDateTime createTimestamp;@Column(name = "original_invoice_number")private String originalInvoiceNumber;@Column(name = "margin_month")private LocalDate marginMonth;@Column(name = "cancelled")private boolean cancelled;public int getId() {return id;}public void setId(int id) {this.id = id;}public int getFofoId() {return fofoId;}public void setFofoId(int fofoId) {this.fofoId = fofoId;}public String getCreditNoteNumber() {return creditNoteNumber;}public void setCreditNoteNumber(String creditNoteNumber) {this.creditNoteNumber = creditNoteNumber;}public CreditNoteType getType() {return type;}public void setType(CreditNoteType type) {this.type = type;}public LocalDateTime getCreateTimestamp() {return createTimestamp;}public void setCreateTimestamp(LocalDateTime createTimestamp) {this.createTimestamp = createTimestamp;}@Overridepublic String toString() {return "CreditNote{" +"id=" + id +", fofoId=" + fofoId +", creditNoteNumber='" + creditNoteNumber + '\'' +", cnDate='" + cnDate + '\'' +", type=" + type +", createTimestamp=" + createTimestamp +'}';}public LocalDateTime getCnDate() {return cnDate;}public void setCnDate(LocalDateTime cnDate) {this.cnDate = cnDate;}public String getOriginalInvoiceNumber() {return originalInvoiceNumber;}public void setOriginalInvoiceNumber(String originalInvoiceNumber) {this.originalInvoiceNumber = originalInvoiceNumber;}public LocalDate getMarginMonth() {return marginMonth;}public void setMarginMonth(LocalDate marginMonth) {this.marginMonth = marginMonth;}public boolean isCancelled() {return cancelled;}public void setCancelled(boolean cancelled) {this.cancelled = cancelled;}@Overridepublic boolean equals(Object o) {if (this == o) return true;if (o == null || getClass() != o.getClass()) return false;CreditNote that = (CreditNote) o;return id == that.id && fofoId == that.fofoId && Objects.equals(creditNoteNumber, that.creditNoteNumber) && Objects.equals(cnDate, that.cnDate) && type == that.type && Objects.equals(createTimestamp, that.createTimestamp);}@Overridepublic int hashCode() {return Objects.hash(id, fofoId, creditNoteNumber, cnDate, type, createTimestamp);}}