package com.zhongshu.card.client.openApi.model;

import com.github.microservice.models.type.DeviceType;
import com.zhongshu.card.client.model.org.OrganizationMiniModel;
import com.zhongshu.card.client.model.org.OrganizationSimpleModel;
import com.zhongshu.card.client.model.school.AreaSimpleModel;
import com.zhongshu.card.client.type.DataState;
import com.zhongshu.card.client.type.OnLineState;
import com.zhongshu.opengateway.client.model.OpenApiModel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.ObjectUtils;

/**
 * @author TRX
 * @date 2024/11/12
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DeviceInfoOpenApiSimpleModel extends OpenApiModel {

    @Schema(description = "设备ID、设备编号")
    private String deviceId;

    @Schema(description = "设备名称")
    private String deviceName;

    @Schema(description = "设备类型，如 消费机 门禁机")
    private DeviceType deviceType;

    private String deviceTypeStr;

    public String getDeviceTypeStr() {
        if (deviceType != null) {
            return deviceType.getRemark();
        }
        return "";
    }
}
