package shop.alien.entity.store;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * 咨询订单
 *
 * @author system
 * @since 2025-01-XX
 */
@Data
@JsonInclude
@TableName("lawyer_consultation_order")
@ApiModel(value = "LawyerConsultationOrder对象", description = "咨询订单")
public class LawyerConsultationOrder extends Model<LawyerConsultationOrder> {

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "订单编号")
    @TableField("order_number")
    private String orderNumber;

    @ApiModelProperty(value = "客户端用户ID")
    @TableField("client_user_id")
    private Integer clientUserId;

    @ApiModelProperty(value = "律师用户ID")
    @TableField("lawyer_user_id")
    private Integer lawyerUserId;

    @ApiModelProperty(value = "法律问题场景ID")
    @TableField("problem_scenario_id")
    private String problemScenarioId;

    @ApiModelProperty(value = "问题描述")
    @TableField("problem_description")
    private String problemDescription;

    @ApiModelProperty(value = "订单金额,单位分")
    @TableField("order_amount")
    private Integer orderAmount;

    @ApiModelProperty(value = "咨询费用,单位分")
    @TableField("consultation_fee")
    private Integer consultationFee;

    @ApiModelProperty(value = "咨询开始时间")
    @TableField("start_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startTime;

    @ApiModelProperty(value = "咨询结束时间")
    @TableField("end_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endTime;

    @ApiModelProperty(value = "订单状态, 0:待支付, 2:进行中, 3:已完成, 4:已取消")
    @TableField("order_status")
    private Integer orderStatus;

    @ApiModelProperty(value = "支付状态, 0:未支付, 1:已支付")
    @TableField("payment_status")
    private Integer paymentStatus;

    @ApiModelProperty(value = "下单时间")
    @TableField("order_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date orderTime;

    @ApiModelProperty(value = "支付时间")
    @TableField("payment_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date paymentTime;

    @ApiModelProperty(value = "订单有效期")
    @TableField("validity_period")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date validityPeriod;

    @ApiModelProperty(value = "用户评分, 1-5星")
    @TableField("rating")
    private Integer rating;

    @ApiModelProperty(value = "用户评价内容")
    @TableField("comment")
    private String comment;

    @ApiModelProperty(value = "删除标记, 0:未删除, 1:已删除")
    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime;

    @ApiModelProperty(value = "创建人ID")
    @TableField("created_user_id")
    private Integer createdUserId;

    @ApiModelProperty(value = "修改时间")
    @TableField(value = "updated_time", fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedTime;

    @ApiModelProperty(value = "修改人ID")
    @TableField("updated_user_id")
    private Integer updatedUserId;

    @ApiModelProperty(value = "支付宝订单编号")
    @TableField("alipay_no")
    private String alipayNo;

    @ApiModelProperty(value = "支付宝订单字符串")
    @TableField("order_str")
    private String orderStr;

    @ApiModelProperty(value = "律所id")
    @TableField("place_id")
    private  Integer placeId;

    @ApiModelProperty(value = "律师收益（订单金额-平台佣金）")
    @TableField("lawyer_earnings")
    private  Integer lawyerEarnings;

    @ApiModelProperty(value = "律师接单时间")
    @TableField("accept_orders_time")
    private  Date acceptOrdersTime;

    @ApiModelProperty(value = "拒绝接单原因")
    @TableField("reason_order_refusal")
    private  String reasonOrderRefusal;

    @ApiModelProperty(value = "律师接单状态  0接单  1拒绝接单")
    @TableField("accept_orders_status")
    private  Integer acceptOrdersStatus;

    @ApiModelProperty(value = "申请退款状态，0-未申请，1-已申请，2-律师已拒绝，3-律师已同意")
    @TableField("apply_refund_status")
    private String applyRefundStatus;

    @ApiModelProperty(value = "申请退款时间")
    @TableField(value = "apply_refund_time", fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date applyRefundTime;

    @ApiModelProperty(value = "申请退款处理时间")
    @TableField(value = "apply_refund_process_time", fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date applyRefundProcessTime;

    @ApiModelProperty(value = "申请退款原因")
    @TableField("apply_refund_reason")
    private String applyRefundReason;

    @ApiModelProperty(value = "拒绝退款原因")
    @TableField("reject_refund_reason")
    private String rejectRefundReason;

    @ApiModelProperty(value = "是否已被申诉, 0:未申诉, 1:已申诉, 2:申诉中")
    @TableField("is_appealed")
    private Integer isAppealed;

    @ApiModelProperty(value = "退款申请处理动作：1-同意，2-拒绝")
    @TableField(exist = false)
    private String processAction;

    @ApiModelProperty(value = "支付方式 1支付宝 2微信")
    @TableField("pay_type")
    private  String payType;


    @ApiModelProperty(value = "分钟收费-钱数")
    @TableField("charge_minute")
    private Integer chargeMinute;

    @ApiModelProperty(value = "分钟收费-分钟数")
    @TableField("minute_num")
    private Integer minuteNum;

    @ApiModelProperty(value = "次数收费-钱数")
    @TableField("charge_time")
    private Integer chargeTime;

    @ApiModelProperty(value = "次数收费-次数")
    @TableField("time_num")
    private Integer timeNum;

    @ApiModelProperty(value = "价格")
    @TableField(exist = false)
    private Integer price;

    @ApiModelProperty(value = "方式  次 / 分钟")
    @TableField(exist = false)
    private String serviceType;




}

