package com.ruoyi.model.domain;

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

import com.baomidou.mybatisplus.annotation.TableField;
import com.cyl.h5.pojo.vo.H5OrderVO;
import com.cyl.manager.oms.pojo.vo.ManagerOrderDetailVO;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.applet.pojo.vo.OrderPetH5Vo;
import lombok.Data;
import com.ruoyi.common.annotation.Excel;

/**
 * 订单信息对象 applet_order
 * 
 * @author ruoyi
 * @date 2025-03-28
 */
@Data
public class AppletOrder {
    private static final long serialVersionUID = 1L;

    /** 唯一标识 */
    private Long id;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /** 创建者 */
    private Integer createBy;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    /** 修改者 */
    private Integer updateBy;

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

    /** 订单状态 */
    @Excel(name = "订单状态 好像是接单状态 0待接单 1已接单, 2已取消")
    private Integer status;

    /** 派单次数 */
    @Excel(name = "派单次数")
    private Integer num;

    /** 本单酬劳 */
    @Excel(name = "本单酬劳")
    private BigDecimal price;

    /** 地址 */
    @Excel(name = "地址")
    private String address;

    //开始派单类型
    @Excel(name = "开始派单类型")
    private String createType;

    /** 最新派单-订单类型 0系统派单 1指定伴宠师 */
    @Excel(name = "最新派单类型")
    private String type;

    //最新派单时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "最新派单时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime newOrderTime;


    /** 无法接单原因 */
    @Excel(name = "无法接单原因")
    private String reason;

    /** 接单伴宠师ID */
    @Excel(name = "接单伴宠师ID")
    private Long userId;


    /** 派单给的用户集合 多个用,隔开 */
    @Excel(name = "派单给的用户集合")
    private String userIdJson;

    /** 开始派单给的用户集合 多个用,隔开 */
    @Excel(name = "开始派单给的用户集合")
    private String startUserIdJson;

    /** 关联宠物ID */
    @Excel(name = "关联宠物ID")
    private Integer petId;

    /** 超时未接单，通知次数 -1通知了管理员 其他通知次数 */
    @Excel(name = "超时未接单，通知次数")
    private Long noticeSystemFlag;


    //订单接单时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "订单接单时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime acceptTime;

    //接单用时(秒)
    @Excel(name = "接单用时(秒)", width = 30)
    private Long whenTakOrders;


    private Long orderId;
    private String orderSn;
    private Integer orderTime;

    //指定的伴宠师等级
    private  Integer companionLevel;

    /** 经度 */
    private Double longitude;

    /** 纬度 */
    private Double latitude;



    @TableField(exist = false)
    private H5OrderVO h5OrderVO;


    @TableField(exist = false)
    private ManagerOrderDetailVO managerOrderDetailVO;


    //给用户的返点
    @TableField(exist = false)
    private BigDecimal orderGive;


    @TableField(exist = false)
    private OrderPetH5Vo orderPetH5Vo;

    @TableField(exist = false)
    private String userName;
}