package com.zhyc.module.produce.breed.domain;

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

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

/**
 * 孕检记录对象 sc_pregnancy_record
 *
 * @author zhyc
 * @date 2025-01-21
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ScPregnancyRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

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

    /** 耳号 */
    @Excel(name = "耳号")
    private String manageTags;

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

    /** 孕检结果 */
    @Excel(name = "孕检结果")
    private String result;

    /** 胎儿数量 */
    @Excel(name = "胎儿数量")
    private Integer fetusCount;

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

    /** 孕检方式 */
    @Excel(name = "孕检方式")
    private String way;

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

    /** 是否删除 */
    private Integer isDelete;

    // 关联查询字段
    /** 品种 */
    @Excel(name = "品种")
    private String variety;

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

    /** 胎次 */
    @Excel(name = "胎次")
    private Integer parity;

    /** 配次 */
    @Excel(name = "配次")
    private Integer matingCounts;

    /** 当前羊舍 */
    @Excel(name = "当前羊舍")
    private String sheepfoldName;

    /** 繁育状态 */
    @Excel(name = "繁育状态")
    private String breedStatus;

    /** 配种公羊耳号 */
    @Excel(name = "配种公羊")
    private String fatherManageTags;

    /** 配种公羊品种 */
    @Excel(name = "配种公羊品种")
    private String fatherVariety;

    /** 配种类型 */
    @Excel(name = "配种类型")
    private String matingTypeName;

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

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

    /** 上次事件日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "上次事件日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastEventDate;

    /** 所在牧场 */
    @Excel(name = "所在牧场")
    private String ranchName;

    /** 配后天数 */
    @Excel(name = "配后天数")
    private Integer daysAfterMating;
    /** 全部羊耳号列表（用于多耳号查询） */
    private List<String> allEarNumbers;
    // 1. 新增字段
    @Excel(name = "孕检原因")
    private String reason; // 初检/复检

    // 2. 胚胎移植相关字段 (用于前端显示)
    @Excel(name = "供体母羊")
    private String donorEwe;
    @Excel(name = "供体母羊品种")
    private String donorEweVariety;
    @Excel(name = "供体公羊")
    private String donorRam;
    @Excel(name = "供体公羊品种")
    private String donorRamVariety;
    @Excel(name = "移胚数")
    private Integer embryoCount;

    public List<String> getAllEarNumbers() {
        return allEarNumbers;
    }

    public void setAllEarNumbers(List<String> allEarNumbers) {
        this.allEarNumbers = allEarNumbers;
    }
}