package com.ruoyi.ss.vip.domain;

import java.time.LocalDateTime;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.ValidGroup;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;

/**
 * 会员对象 ss_vip
 *
 * @author ruoyi
 * @date 2024-12-09
 */
@Data
public class Vip extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    private Long id;

    @Excel(name = "用户ID")
    @ApiModelProperty("用户ID")
    private Long userId;

    @Excel(name = "店铺ID")
    @ApiModelProperty("店铺ID")
    private Long storeId;

    @Excel(name = "会员等级ID")
    @ApiModelProperty("会员等级ID")
    @NotNull(message = "会员等级不允许为空", groups = {ValidGroup.Create.class})
    private Long levelId;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "有效期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("有效期")
    private LocalDateTime expireTime;

    @Excel(name = "过期类型", readConverterExp = "1=永久,2=时限")
    @ApiModelProperty("过期类型")
    private String expireType;
}
