package com.kexue.skills.entity;

import java.util.Date;

import java.io.Serializable;
import com.kexue.skills.entity.base.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * (ContentPurchase)实体类
 * 内容购买记录表，记录用户购买的内容信息
 *
 * @author 王志维
 * @since 2025-02-21 23:01:48
 */
@Data
public class ContentPurchase extends BaseEntity implements Serializable  {
    private static final long serialVersionUID = 1L;

        @Schema(description ="主键ID")
        private Long purchaseId;

        @Schema(description ="用户ID")
        private Long userId;

        @Schema(description ="用户名")
        private String userName;

        @Schema(description ="内容ID")
        private Long contentId;

        @Schema(description ="内容标题")
        private String contentTitle;

        @Schema(description ="购买方式：1.余额支付 2.积分支付")
        private Integer payType;

        @Schema(description ="支付金额")
        private java.math.BigDecimal amount;

        @Schema(description ="支付积分")
        private Integer points;

        @Schema(description ="购买状态：1.待支付 2.已支付 3.已取消")
        private Integer status;

        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        @Schema(description ="购买时间")
        private Date purchaseTime;

        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        @Schema(description ="创建时间")
        private Date createTime;

        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        @Schema(description ="更新时间")
        private Date updateTime;

        @Schema(description ="是否删除 ：0 未删除，1已删除")
        private Integer deleteFlag;

        @Schema(description ="创建人")
        private String createBy;

        @Schema(description ="更新人")
        private String updateBy;

}