package com.ruoyi.system.domain;

import java.sql.Time;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 订单信息对象 sys_order
 * 
 * @author haotian
 * @date 2024-11-21
 */
public class SysOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 订单id */
    private Long orderId;

    /** 用户id，关联sys_user中的user_id */
    @Excel(name = "用户id，关联sys_user中的user_id")
    private Long userId;

    /** 资源位id，关联sys_source中的source_id */
    @Excel(name = "资源位id，关联sys_source中的source_id")
    private Long sourceId;

    /** 订单开始时间，只记录到天 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "订单开始时间，只记录到天", width = 30, dateFormat = "yyyy-MM-dd")
    private LocalDateTime startTime;

    /** 订单结束时间，只记录到天 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "订单结束时间，只记录到天", width = 30, dateFormat = "yyyy-MM-dd")
    private LocalDateTime endTime;

    /** 删除标志，默认为0 */
    @Excel(name = "删除标志，默认为0")
    private String deleteFlag;

//    private Long orderInfoId;

    private String orderInfoId;
    // 实付金额
    private Long money;

    // 订单来源--微信--支付宝等
    private String way;

    // 订单详情
    private String detail;

    // 订单状态
    private String status;

    // 退款金额
    private Long refund;

    // 退款时间
    private Date updateTime;

    public void setOrderId(Long orderId) 
    {
        this.orderId = orderId;
    }

    public Long getOrderId() 
    {
        return orderId;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setSourceId(Long sourceId) 
    {
        this.sourceId = sourceId;
    }

    public Long getSourceId() 
    {
        return sourceId;
    }

    public void setStartTime(LocalDateTime startTime)
    {
        this.startTime = startTime;
    }

    public LocalDateTime getStartTime()
    {
        return startTime;
    }

    public void setEndTime(LocalDateTime endTime)
    {
        this.endTime = endTime;
    }

    public LocalDateTime getEndTime()
    {
        return endTime;
    }

    public void setDeleteFlag(String deleteFlag) 
    {
        this.deleteFlag = deleteFlag;
    }

    public String getDeleteFlag() 
    {
        return deleteFlag;
    }

    public String getOrderInfoId() {
		return orderInfoId;
	}

    public void setOrderInfoId(String orderInfoId) {
		this.orderInfoId = orderInfoId;
	}

    public Long getMoney() {
		return money;
	}

    public void setMoney(Long money) {
		this.money = money;
	}

    public String getWay() {
		return way;
	}

    public void setWay(String way) {
		this.way = way;
	}

    public String getDetail() {
		return detail;
	}

    public void setDetail(String detail) {
		this.detail = detail;
	}

    public String getStatus() {
		return status;
	}

    public void setStatus(String status) {
		this.status = status;
	}

    public Long getRefund() {
		return refund;
	}

    public void setRefund(Long refund) {
		this.refund = refund;
	}

    public Date getUpdateTime() {
		return updateTime;
	}

    public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}



    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("orderId", getOrderId())
            .append("userId", getUserId())
            .append("sourceId", getSourceId())
            .append("createTime", getCreateTime())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("deleteFlag", getDeleteFlag())
                .append("orderInfoId", getOrderInfoId())
                .append("money", getMoney())
                .append("way", getWay())
                .append("detail", getDetail())
                .append("status", getStatus())
                .append("detail", getDetail())
            .toString();
    }
}
