package com.gxwebsoft.clinic.entity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.List;

import com.gxwebsoft.shop.entity.Order;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 处方主表

 *
 * @author LX
 * @since 2025-12-10 11:28:03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "PrescriptionOrder对象", description = "处方主表")
@TableName("clinic_prescription_order")
public class PrescriptionOrder implements Serializable {
    private static final long serialVersionUID = 1L;

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

    private Integer clinicId;

    @ApiModelProperty(value = "患者")
    private Integer userId;

    @ApiModelProperty(value = "医生")
    private Integer doctorId;

    private Integer orderId;

    @ApiModelProperty(value = "订单编号")
    private String orderNo;

    @ApiModelProperty(value = "关联就诊表")
    private Integer visitRecordId;

    @ApiModelProperty(value = "处方类型 0中药 1西药")
    private Integer prescriptionType;

    @ApiModelProperty(value = "诊断结果")
    private String diagnosis;

    @ApiModelProperty(value = "治疗方案")
    private String treatmentPlan;

    @ApiModelProperty(value = "煎药说明")
    private String decoctionInstructions;

    @ApiModelProperty(value = "上传照片")
    private String image;

    @ApiModelProperty(value = "订单总金额")
    private BigDecimal orderPrice;

    @ApiModelProperty(value = "单价")
    private BigDecimal price;

    @ApiModelProperty(value = "实付金额")
    private BigDecimal payPrice;

    @ApiModelProperty(value = "煎药金额")
    private BigDecimal decoctionAmount;

    @ApiModelProperty(value = "快递金额")
    private BigDecimal expressAmount;

    @ApiModelProperty(value = "订单是否失效(0未失效 1已失效)")
    private Integer isInvalid;

    @ApiModelProperty(value = "结算(0未结算 1已结算)")
    private Integer isSettled;

    @ApiModelProperty(value = "结算时间")
    private LocalDateTime settleTime;

    @ApiModelProperty(value = "姓名")
    private String name;

    @ApiModelProperty(value = "手机号码")
    private String phone;

    @ApiModelProperty(value = "所在国家")
    private String country;

    @ApiModelProperty(value = "所在省份")
    private String province;

    @ApiModelProperty(value = "所在城市")
    private String city;

    @ApiModelProperty(value = "所在辖区")
    private String region;

    @ApiModelProperty(value = "收货地址")
    private String address;

    private String fullAddress;

    private String expressName;

    private String expressNo;

    @ApiModelProperty(value = "排序号")
    private Integer sortNumber;

    @ApiModelProperty(value = "状态, 0正常, 1已完成，2已支付，3已取消")
    private Integer status;

    @ApiModelProperty(value = "备注")
    private String comments;

    @ApiModelProperty(value = "商城ID")
    private Integer tenantId;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "修改时间")
    private LocalDateTime updateTime;


    @Schema(description = "处方明细")
    @TableField(exist = false)
    private List<PrescriptionOrderItem> items;

    @TableField(exist = false)
    private Boolean showPayButton;

    @TableField(exist = false)
    private Order shopOrder;
}
