package com.gxwebsoft.shop.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalTime;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
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-01-11 10:45:12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "ShopOrderInfo对象", description = "场地")
public class ShopOrderInfo implements Serializable {
    private static final long serialVersionUID = 1L;

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

    @Schema(description = "关联订单表id")
    private Integer orderId;

    @Schema(description = "组合数据:日期+时间段+场馆id+场地id")
    private String orderCode;

    @Schema(description = "关联商户ID")
    private Long merchantId;

    @Schema(description = "商户名称")
    private String merchantName;

    @Schema(description = "关联场地id")
    private Integer fieldId;

    @Schema(description = "场地名称")
    private String fieldName;

    @Schema(description = "单价")
    private BigDecimal price;

    @Schema(description = "儿童价")
    private BigDecimal childrenPrice;

    @Schema(description = "成人人数")
    private Integer adultNum;

    @Schema(description = "儿童人数")
    private Integer childrenNum;

    @Schema(description = "已核销的成人票数")
    private Integer adultNumUse;

    @Schema(description = "已核销的儿童票数")
    private Integer childrenNumUse;

    @Schema(description = "0 未付款 1已付款，2无需付款或占用状态")
    private Integer payStatus;

    @Schema(description = "0未使用，1已完成，2已取消，3取消中，4退款申请中，5退款被拒绝，6退款成功，7客户端申请退款")
    private Integer orderStatus;

    @Schema(description = "是否免费：0收费、1免费")
    private Boolean isFree;

    @Schema(description = "是否支持儿童票：0不支持、1支持")
    private Boolean isChildren;

    @Schema(description = "系统版本 0当前版本 其他版本")
    private Integer version;

    @Schema(description = "预订类型：0全场，1半场")
    private Boolean isHalf;

    @Schema(description = "预约时间段")
    private String timePeriod;

    @Schema(description = "预定日期")
    private LocalDate dateTime;

    @Schema(description = "开场时间")
    private LocalTime startTime;

    @Schema(description = "结束时间")
    private LocalTime endTime;

    @Schema(description = "毫秒时间戳")
    private Long timeFlag;

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

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

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

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

    @Schema(description = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

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

}
