package com.zhongshu.card.server.core.domain.devices.thing;

import com.github.microservice.types.deviceUse.DeviceCategory;
import com.github.microservice.types.deviceUse.DeviceType;
import com.github.microservice.types.deviceUse.ThingType;
import com.zhongshu.card.server.core.domain.base.SuperMain;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.mongodb.core.mapping.Document;

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

/**
 * 物模型数据
 *
 * @author TRX
 * @date 2025/3/3
 */
@Data
@Document
@NoArgsConstructor
@AllArgsConstructor
public class IotThing extends SuperMain {

    @Schema(description = "物模型类型：自动、手动创建")
    private ThingType thingType;

    @Schema(description = "编码")
    private String code;

    @Schema(description = "名称")
    private String name;

    @Schema(description = "设备数量")
    private Long deviceCount = 0L;

    @Schema(description = "所属分组")
    private String projectCode;

    //-----------------所属产品 start-----------
    @Schema(description = "所属产品数据id")
    private String iotTemplateId;

    @Schema(description = "关联code,产品code")
    private String productCode;

    @Schema(description = "产品名称")
    private String productName;

    //-----------------管理的设备类型 start ---------

    @Schema(description = "设备id")
    private String deviceId;

    @Schema(description = "设备品类")
    private DeviceCategory deviceCategory;

    @Schema(description = "设备id集合")
    private List<String> deviceIds = new ArrayList<>();

    @Schema(description = "设备类型集合")
    private List<DeviceType> deviceTypes = new ArrayList<>();

}
