package com.hzs.common.domain.member.detail;

import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hzs.common.core.web.domain.BaseEntity;
import lombok.*;
import lombok.experimental.Accessors;

/**
 * 会员信息-等级升级记录
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@KeySequence("CU_MEMBER_LEVEL_SEQ")
@TableName("CU_MEMBER_LEVEL")
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class CuMemberLevel extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId("PK_ID")
    private Long pkId;

    /**
     * 会员主键
     */
    @TableField("PK_MEMBER")
    private Long pkMember;

    /**
     * 升级时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("UPGRADE_TIME")
    private Date upgradeTime;

    /**
     * 升级类型 (1=自动升级,2=手动升级,3=购买赠予,4=购买升级,5=活动升级)
     */
    @TableField("UP_TYPE")
    private Integer upType;

    /**
     * 原等级
     */
    @TableField("OLD_LEVEL")
    private Integer oldLevel;

    /**
     * 新等级
     */
    @TableField("NEW_LEVEL")
    private Integer newLevel;

    /**
     * 备注
     */
    @TableField("REMARK")
    private String remark;

    /**
     * 订单主键
     */
    @TableField("PK_ORDER")
    private Long pkOrder;

    /**
     * 结算期间
     */
    @TableField("PERIOD")
    private Integer period;

}
