package com.gxwebsoft.project.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.baomidou.mybatisplus.annotation.TableLogic;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 续费管理
 *
 * @author 科技小王子
 * @since 2025-03-14 16:21:11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "ProjectRenew对象", description = "续费管理")
public class ProjectRenew implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description = "自增ID")
    @TableId(value = "app_renew_id", type = IdType.AUTO)
    private Integer appRenewId;

    @Schema(description = "应用ID")
    private Integer appId;

    @Schema(description = "类型, 0续费, 1新购")
    private Integer type;

    @Schema(description = "订单编号")
    private String orderNo;

    @Schema(description = "应用名称")
    @TableField(exist = false)
    private String appName;

    @Schema(description = "应用图标")
    @TableField(exist = false)
    private String appIcon;

    @Schema(description = "续费金额")
    private BigDecimal money;

    @Schema(description = "订单总额")
    private BigDecimal totalPrice;

    @Schema(description = "实际付款")
    private BigDecimal payPrice;

    @Schema(description = "优惠金额")
    private BigDecimal reducePrice;

    @Schema(description = "续费时长(按年)")
    private Integer duration;

    @Schema(description = "续费时长(按天)")
    private Integer days;

    @Schema(description = "支付方式, 0余额, 1微信,102微信Native, 3支付宝, 4现金")
    private Integer payType;

    @Schema(description = "备注")
    private String comments;

    @Schema(description = "开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;

    @Schema(description = "到期时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;

    @Schema(description = "到期时间")
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime expirationTime;

    @Schema(description = "状态, 0正常, 1 即将过期")
    private Integer soon;

    @Schema(description = "客户(用户ID)")
    @TableField(exist = false)
    private Integer customerId;

    @Schema(description = "客户名称")
    @TableField(exist = false)
    private String customerName;

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

    @Schema(description = "付款凭证")
    private String images;

    @Schema(description = "操作员姓名")
    @TableField(exist = false)
    private String nickname;

    @Schema(description = "操作员头像")
    @TableField(exist = false)
    private String avatar;

    @Schema(description = "状态, 0正常, 1待确认")
    private Integer status;

    @Schema(description = "是否删除, 0否, 1是")
    @TableLogic
    private Integer deleted;

    @Schema(description = "租户id")
    private Integer tenantId;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

}
