package com.bizzan.bitrade.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

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

@Entity
@Data
@Table(name = "config_coin_symbol")
public class ConfigCoinSymbol {

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

    @Column(name = "coin_symbol")
    private String coinSymbol;

    @Column(name = "contract_precision")
    private Integer contractPrecision;

    @Column(name = "show_precision")
    private Integer showPrecision;

    @Column(name = "is_quote")
    private Integer isQuote;

    @Column(name = "is_open")
    private Integer isOpen;

    @Column(name = "icon")
    private String icon;

    @Column(name = "sort")
    private Integer sort;

    @Column(name = "name")
    private String name;

    @Column(name = "token_base")
    private String tokenBase;

    @Column(name = "tag_type")
    private Integer tagType;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Column(name = "ctime", updatable = false)
    private Date ctime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Column(name = "mtime")
    private Date mtime;
}
