package digital.laboratory.platform.entrustment.vo;

import digital.laboratory.platform.sys.entity.entrustment.Sample;
import digital.laboratory.platform.sys.entity.entrustment.SampleBox;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * 这个 VO 类额外提供了保存在盒子中的样品对象的列表
 */
@Data
public class SampleBoxVO extends SampleBox {
	List<Sample> sampleList;
	private int boxSampleCount;//盒子下有多少个样本
	public SampleBoxVO(SampleBox sb, List<Sample> sampleList) {
		this.setId(sb.getId());
		this.setBoxNo(sb.getBoxNo());
		this.setBoxType(sb.getBoxType());
		this.setStorageMethod(sb.getStorageMethod());
		this.setSource(sb.getSource());
		this.setEntrustmentId(sb.getEntrustmentId());
		this.setJobId(sb.getJobId());
		this.setSampleType(sb.getSampleType());
		this.setComments(sb.getComments());
		this.sampleList = new ArrayList<Sample>(sampleList);
	}
}
