package com.microservices.zone.member.domain.vo;

import com.microservices.zone.member.domain.points.ZonePointsTransaction;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 积分流水搜索对象（合并事件+流水）
 *
 * @author otto
 */
@Data
@ApiModel("积分流水搜索对象")
public class ZonePointsTransactionSearchVo {
    @ApiModelProperty(value = "事件ID")
    private String eventId;

    @ApiModelProperty(value = "事件类型")
    private String eventType;

    @ApiModelProperty(value = "积分账户ID")
    private Long accountId;

    @ApiModelProperty(value = "类型：add增/reduce减/freezed冻结/unfreezed解冻")
    private String transactionType;

    @ApiModelProperty(value = "来源ID")
    private Long sourceId;

    public ZonePointsTransaction toZonePointsTransaction() {
        ZonePointsTransaction zonePointsTransaction = new ZonePointsTransaction();
        zonePointsTransaction.setEventId(eventId);
        zonePointsTransaction.setEventType(eventType);
        zonePointsTransaction.setAccountId(accountId);
        zonePointsTransaction.setTransactionType(transactionType);
        zonePointsTransaction.setSourceId(sourceId);
        return zonePointsTransaction;
    }
}