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

import com.github.microservice.models.type.DeviceSpecType;
import com.github.microservice.models.type.DeviceType;
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.index.Indexed;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * 产品上绑定的设备
 *
 * @author TRX
 * @date 2025/1/8
 */
@Data
@Document
@NoArgsConstructor
@AllArgsConstructor
public class DeviceProductBindDevice extends SuperMain {

    @Schema(description = "所属产品")
    @DBRef(lazy = true)
    private DeviceProduct deviceProduct;

    @Schema(description = "")
    @Indexed
    private String deviceProductId;

    @DBRef(lazy = true)
    @Schema(description = "设备信息")
    private DeviceInfo deviceInfo;

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

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

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

    @Schema(description = "设备型号")
    private DeviceSpecType deviceModel;
}
