package com.jeesharp.business.modules.member.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.jeesharp.framework.mybatis.core.dataobject.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 会员付费开通记录实体类
 *
 * @author jeesharp
 * @version 2026-03-19
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("app_member_vip")
@Schema(description = "会员付费开通记录实体")
public class MemberVip extends BaseEntity<MemberVip> {

    /**
     * 会员ID
     */
    @Schema(description = "会员ID")
    private String memberId;

    /**
     * 付费等级编码（如 VIP、SVIP）
     */
    @Schema(description = "付费等级编码")
    private String levelCode;

    /**
     * 商品/套餐ID（IAP 商品 ID）
     */
    @Schema(description = "商品/套餐ID")
    private String productId;

    /**
     * 套餐名称（月卡/年卡等）
     */
    @Schema(description = "套餐名称")
    private String productName;

    /**
     * 关联订单号
     */
    @Schema(description = "关联订单号")
    private String orderNo;

    /**
     * 生效开始时间
     */
    @Schema(description = "生效开始时间")
    private LocalDateTime startDate;

    /**
     * 到期时间
     */
    @Schema(description = "到期时间")
    private LocalDateTime expireDate;

    /**
     * 状态：0-已过期 1-有效 2-已取消
     *
     * @see com.jeesharp.business.modules.member.enums.MemberVipStatusEnum
     */
    @Schema(description = "状态：0-已过期 1-有效 2-已取消")
    private Integer status;
}
