package com.bizzan.bitrade.entity;

import lombok.Data;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 币种扩展信息表
 */
@Entity
@Data
@Table(name = "coin_ext")
public class CoinExt {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @Column(nullable = false, unique = true, length = 50)
    private String symbol;

    @Column(name = "name_cn", length = 100)
    private String nameCn;

    @Column(name = "name_en", length = 100)
    private String nameEn;

    @Column(length = 500)
    private String icon;

    private Integer rank;

    @Column(name = "market_cap", length = 100)
    private String marketCap;

    @Column(name = "circulating_supply", length = 100)
    private String circulatingSupply;

    @Column(name = "issue_price", precision = 20, scale = 8)
    private BigDecimal issuePrice;

    @Column(name = "ath_price", precision = 20, scale = 8)
    private BigDecimal athPrice;

    @Column(name = "ath_date")
    private Date athDate;

    @Column(length = 500)
    private String whitepaper;

    @Column(name = "created_time")
    @Temporal(TemporalType.TIMESTAMP)
    private Date createdTime;

    @Column(name = "updated_time")
    @Temporal(TemporalType.TIMESTAMP)
    private Date updatedTime;
}
