package com.zhyc.module.biosafety.domain;

import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zhyc.module.enums.Gender;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.zhyc.common.annotation.Excel;
import com.zhyc.common.core.domain.BaseEntity;

/**
 * 免疫对象 sw_immunity
 * 
 * @author ruoyi
 * @date 2025-07-15
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Immunity extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 羊只id */
    @Excel(name = "羊只id")
    private Long sheepId;

    private Integer[] sheepIds;

    /** 羊只id */
    @Excel(name = "羊只耳号")
    private String sheepNo;
    @Excel(name = "品种")

    private String variety;
    @Excel(name = "羊只类别")
    private String sheepType;

    @Excel(name = "羊只性别")
    private String genderName;
    private String gender;

    @Excel(name = "月龄")
    private Long monthAge;

    @Excel(name = "繁殖状态")
    private String breed;
    /** 胎次 */
    @Excel(name = "胎次")
    private Long parity;

    /** 使用记录 */
    @Excel(name = "使用记录")
    private Integer usageId;


    /** 免疫日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "免疫日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date datetime;

    /** 技术员 */
    @Excel(name = "技术员")
    private String technical;

    /** 备注 */
    @Excel(name = "备注")
    private String comment;

    //    药品使用
    private List<SwMedicineUsageDetails> usageDetails;
    public void setGender(String gender) {
        this.gender = gender;
        this.genderName = Gender.getDescByCode(Integer.valueOf(gender));
    }
    //  排序查询
    private String orderByColumn;
    private String isAsc;

}
