package com.ruoyi.ss.cardOrder.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.Date;
import java.util.List;

/**
 * 卡券订单对象 ss_card_order
 *
 * @author qzz
 * @date 2025-03-20
 */
@Data
public class CardOrder extends BaseEntity{

    private static final long serialVersionUID = 1L;

    private Long orderId;

    @Excel(name = "订单号")
    @ApiModelProperty("订单号")
    private String orderNo;

    @Excel(name = "用户ID")
    @ApiModelProperty("用户ID")
    private Long userId;

    @Excel(name = "用户手机号")
    @ApiModelProperty("用户手机号")
    private String phone;

    @Excel(name = "用户名")
    @ApiModelProperty("用户名")
    private String userName;

    @Excel(name = "真实姓名")
    @ApiModelProperty("真实姓名")
    private String realName;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("支付时间")
    private LocalDateTime payTime;

    @Excel(name = "支付方式：wx-微信，alipay-支付宝,sys-系统自动", readConverterExp = "免=费骑行")
    @ApiModelProperty("支付方式：wx-微信，alipay-支付宝,sys-系统自动")
    private String payType;

    @Excel(name = "支付状态:1-待支付，2-支付中，3-支付成功，4-已取消")
    @ApiModelProperty("支付状态:1-待支付，2-支付中，3-支付成功，4-已取消")
    private String paid;

    @Excel(name = "支付单id")
    @ApiModelProperty("支付单id")
    private Long payId;

    @Excel(name = "卡券订单类型：1-储值卡;2-小时卡;3-团购券;4-次卡")
    @ApiModelProperty("卡券订单类型：1-储值卡;2-小时卡;3-团购券;4-次卡")
    private String type;

    @Excel(name = "订单总金额", readConverterExp = "元=")
    @ApiModelProperty("订单总金额")
    private BigDecimal totalFee;

    @Excel(name = "实际支付金额")
    @ApiModelProperty("实际支付金额")
    private BigDecimal payFee;

    @Excel(name = "备注")
    @ApiModelProperty("备注")
    private String mark;

    @Excel(name = "状态：0-待支付；1-支付中、2-待使用、4-已使用,5-已过期")
    @ApiModelProperty("状态：0-待支付；1-支付中、2-待使用、4-已使用,5-已过期")
    private String status;

    @Excel(name = "支付渠道id")
    @ApiModelProperty("支付渠道id")
    private Long payChannel;

    @Excel(name = "appid")
    @ApiModelProperty("appid")
    private String appId;

    @Excel(name = "渠道名称")
    @ApiModelProperty("渠道名称")
    private String channelName;

    @Excel(name = "渠道成本")
    @ApiModelProperty("渠道成本")
    private BigDecimal channelCost;

    @Excel(name = "商户id(用于隔离)")
    @ApiModelProperty("商户id(用于隔离)")
    private Long merchantId;

    @Excel(name = "店铺id")
    @ApiModelProperty("店铺id")
    private Long storeId;

    @Excel(name = "店铺名称")
    @ApiModelProperty("店铺名称")
    private String storeName;

    @Excel(name = "卡券id")
    @ApiModelProperty("卡券id")
    private Long cardId;

    @Excel(name = "卡券名称")
    @ApiModelProperty("卡券名称")
    private String cardName;

    @Excel(name = "限制次数：0-无限制；其他数字直接显示次数")
    @ApiModelProperty("限制次数：0-无限制；其他数字直接显示次数")
    private String limitNum;

    @Excel(name = "储值金额")
    @ApiModelProperty("储值金额")
    private BigDecimal storedAmount;

    @Excel(name = "有效期的值")
    @ApiModelProperty("有效期的值")
    private Integer validityValue;

    @Excel(name = "有效期单位：day-天；week-周；month-月；quarter-季度；year-年")
    @ApiModelProperty("有效期单位：day-天；week-周；month-月；quarter-季度；year-年")
    private String validityUnit;

    @Excel(name = "可用的房间id")
    @ApiModelProperty("可用的房间id")
    private List<Long> availableRooms;

    @Excel(name = "可使用周: 1、2、3、4、5、6")
    @ApiModelProperty("可使用周: 1、2、3、4、5、6")
    private List<String> availableWeek;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "可用时间结束", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("可用时间结束")
    private LocalTime availableTimeEnd;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "可用时间开始", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("可用时间开始")
    private LocalTime availableTimeStart;

    @Excel(name = "抖音sKuid")
    @ApiModelProperty("抖音sKuid")
    private String skuId;

    @Excel(name = "小时")
    @ApiModelProperty("小时")
    private Integer hours;

}
