package com.gxwebsoft.clinic.param;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.gxwebsoft.common.core.annotation.QueryField;
import com.gxwebsoft.common.core.annotation.QueryType;
import com.gxwebsoft.common.core.web.BaseParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.Set;

/**
 * 处方明细表
查询参数
 *
 * @author 科技小王子
 * @since 2025-10-22 02:01:13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@JsonInclude(JsonInclude.Include.NON_NULL)
@Schema(name = "ClinicPrescriptionItemParam对象", description = "处方明细表 查询参数")
public class ClinicPrescriptionItemParam extends BaseParam {
    private static final long serialVersionUID = 1L;

    @Schema(description = "自增ID")
    @QueryField(type = QueryType.EQ)
    private Integer id;

    @Schema(description = "关联处方")
    @QueryField(type = QueryType.EQ)
    private Integer prescriptionId;

    @Schema(description = "订单编号")
    private String prescriptionNo;

    @Schema(description = "关联药品")
    @QueryField(type = QueryType.EQ)
    private Integer medicineId;

    @Schema(description = "剂量（如“10g”）")
    private String dosage;

    @Schema(description = "用法频率（如“每日三次”）")
    private String usageFrequency;

    @Schema(description = "服用天数")
    @QueryField(type = QueryType.EQ)
    private Integer days;

    @Schema(description = "购买数量")
    @QueryField(type = QueryType.EQ)
    private Integer amount;

    @Schema(description = "单价")
    @QueryField(type = QueryType.EQ)
    private BigDecimal unitPrice;

    @Schema(description = "数量")
    @QueryField(type = QueryType.EQ)
    private Integer quantity;

    @Schema(description = "排序号")
    @QueryField(type = QueryType.EQ)
    private Integer sortNumber;

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

    @Schema(description = "用户id")
    @QueryField(type = QueryType.EQ)
    private Integer userId;

    @Schema(description = "处方ID集查询")
    @TableField(exist = false)
    private Set<Integer> prescriptionIds;

}
