/*
 * Copyright ©2023 CJB-CNIT Team. All rights reserved
 */
package com.openhis.web.inventorymanage.dto;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * 追溯码初始化 dto
 *
 * @author yuxj
 * @date 2025-07-08
 */
@Data
@Accessors(chain = true)
public class TraceNoInitDto {

    /**
     * 药房，药库
     */
    private List<TraceNoInitDto.locationOption> locationOptions;

    /**
     * 追溯码状态
     */
    private List<TraceNoInitDto.itemTypeOption> traceNoStatusOptions;

    /**
     * 项目类型
     */
    private List<TraceNoInitDto.itemTypeOption> itemTypeOptions;

    /**
     * 操作类型
     */
    private List<TraceNoInitDto.itemTypeOption> operationTypeOptions;

    @Data
    public static class itemTypeOption {
        private Integer value;
        private String label;

        public itemTypeOption(Integer value, String label) {
            this.value = value;
            this.label = label;
        }
    }

    @Data
    public static class locationOption {
        @JsonSerialize(using = ToStringSerializer.class)
        private Long value;
        private String label;

        public locationOption(Long value, String label) {
            this.value = value;
            this.label = label;
        }
    }
}
