package com.gxwebsoft.clinic.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 出入库
 *
 * @author 科技小王子
 * @since 2025-10-22 02:06:32
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "ClinicMedicineInout对象", description = "出入库")
public class ClinicMedicineInout implements Serializable {
    private static final long serialVersionUID = 1L;

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

    @Schema(description = "买家用户ID")
    private Integer userId;

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

    @Schema(description = "分销商用户id(一级)")
    private Integer firstUserId;

    @Schema(description = "分销商用户id(二级)")
    private Integer secondUserId;

    @Schema(description = "分销商用户id(三级)")
    private Integer thirdUserId;

    @Schema(description = "分销佣金(一级)")
    private BigDecimal firstMoney;

    @Schema(description = "分销佣金(二级)")
    private BigDecimal secondMoney;

    @Schema(description = "分销佣金(三级)")
    private BigDecimal thirdMoney;

    @Schema(description = "单价")
    private BigDecimal price;

    @Schema(description = "订单总金额")
    private BigDecimal orderPrice;

    @Schema(description = "结算金额")
    private BigDecimal settledPrice;

    @Schema(description = "换算成度")
    private BigDecimal degreePrice;

    @Schema(description = "实发金额")
    private BigDecimal payPrice;

    @Schema(description = "税率")
    private BigDecimal rate;

    @Schema(description = "结算月份")
    private String month;

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

    @Schema(description = "佣金结算(0未结算 1已结算)")
    private Integer isSettled;

    @Schema(description = "结算时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime settleTime;

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

    @Schema(description = "商城ID")
    private Integer tenantId;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

}
