package com.platform2easy.genesis.domain.model;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Entity
@Table(name = "orderbook")
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(onlyExplicitlyIncluded = true)
public class Orderbook {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @EqualsAndHashCode.Include
    @Column(name = "orderbook_id")
    private Long id;

    @Column(name = "orderbook_flag", nullable = false)
    private String flag;

    @Column(name = "orderbook_ts", nullable = false)
    private Integer ts;

    @Column(name = "orderbook_is_token", nullable = false)
    private Boolean isToken;

    @Column(name = "orderbook_amount", nullable = false)
    private String amount;

    @Column(name = "status_id", nullable = false)
    private Long statusId;

    @Column(name = "user_id", nullable = false)
    private Long userId;

    @Column(name = "wallet_id", nullable = false)
    private Long walletId;

    @Column(name = "token_id")
    private Long tokenId;

    @Column(name = "currency_id")
    private Long currencyId;

    @Column(name = "chain_id", nullable = false)
    private Long chainId;
}