package shop.alien.entity.store;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 商家会员卡订单表
 * </p>
 *
 * @author ssk
 * @since 2025-03-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="StoreMembershipCardOrder对象", description="商家会员卡订单表")
public class StoreMembershipCardOrder extends Model<StoreMembershipCardOrder> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "会员卡id")
    @TableField("card_id")
    private Integer cardId;

    @ApiModelProperty(value = "订单编号")
    @TableField("order_code")
    private String orderCode;

    @ApiModelProperty(value = "订单状态（0：未过期，1：已过期）")
    @TableField("order_status")
    private Integer orderStatus;

    @ApiModelProperty(value = "订单类型（0：黄金vip，1：白金vip）")
    @TableField("order_type")
    private Integer orderType;

    @ApiModelProperty(value = "购买类型（0：包月，1：包季，2：半年，3：包年）")
    @TableField("purchase_pattern")
    private Integer purchasePattern;

    @ApiModelProperty(value = "开通时间")
    @TableField("opening_time")
    private Date openingTime;

    @ApiModelProperty(value = "到期时间")
    @TableField("expiration_time")
    private Date expirationTime;

    @ApiModelProperty(value = "付款金额")
    @TableField("payment_amount")
    private Double paymentAmount;

    @ApiModelProperty(value = "删除状态")
    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    private Date createdTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
    private Date updatedTime;

    @ApiModelProperty(value = "创建人ID")
    @TableField(value = "created_user_id", fill = FieldFill.INSERT)
    private Integer createdUserId;

    @ApiModelProperty(value = "修改人ID")
    @TableField(value = "updated_user_id", fill = FieldFill.INSERT_UPDATE)
    private Integer updatedUserId;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
