package com.izouma.nineth.domain;

import com.izouma.nineth.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;
import java.math.BigDecimal;

@Data
@Entity
@Table(indexes = {@Index(columnList = "tokenId")})
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class TokenHistory extends BaseEntity {

    private String tokenId;

    private String operation;

    @Column(precision = 10, scale = 2)
    private BigDecimal price;

    private String fromUser;

    private Long   fromUserId;

    private String fromAvatar;

    private String toUser;

    private Long   toUserId;

    private String toAvatar;

    private int projectId;

    /**
     * 关联的资产id
     */
    private Long assetId;
    /**
     * 订单ID
     */
    private Long  orderId;
}
