package cn.iocoder.yudao.module.iot.controller.admin.thingmodel.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@Schema(description = "管理后台 - IoT通用物模型新增/修改 Request VO")
@Data
public class ThingModelCommonSaveReqVO {

    @Schema(description = "物模型功能编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "20707")
    private Long id;

    @Schema(description = "功能标识", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "功能标识不能为空")
    private String identifier;

    @Schema(description = "功能名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
    @NotEmpty(message = "功能名称不能为空")
    private String name;

    @Schema(description = "功能描述", example = "你猜")
    private String description;

    @Schema(description = "功能类型（1 - 属性，2 - 服务，3 - 事件）", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "功能类型（1 - 属性，2 - 服务，3 - 事件）不能为空")
    private Integer type;

    @Schema(description = "属性（存储 ThingModelProperty 的 JSON 数据）")
    private String property;

    @Schema(description = "事件（存储 ThingModelEvent 的 JSON 数据）")
    private String event;

    @Schema(description = "服务（存储服务的 JSON 数据）")
    private String service;

}