package com.cf.imes.module.system.controller.admin.organ.vo.organ;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;

import static com.cf.imes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;

/**
 * @author Gqr
 * @since 2025/9/11 9:52
 */
@Schema(description = "管理后台 - 组织产品购买记录 Request VO")
@Data
public class OrganPagePurchaseRespVO {
    @Schema(description = "购买记录编号")
    private Long id;

    @Schema(description = "产品编号")
    private Long productId;

    @Schema(description = "产品名称")
    private String productName;

    @Schema(description = "购买时长", example = "1")
    private Integer purchaseDuration;

    @Schema(description = "购买时长单位，0：年、1：月", example = "1")
    private Integer purchaseDurationUnit;

    @Schema(description = "赠送时长", example = "1")
    private Integer giftDuration;

    @Schema(description = "赠送时长单位，0：年、1：月", example = "1")
    private Integer giftDurationUnit;

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

    @Schema(description = "产品延期时长")
    private String delayDuration;

    @Schema(description = "产品有效时间")
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    private LocalDate endTime;

    @Schema(description = "订购价格")
    private BigDecimal price;
}
