package cn.lihongjie.coal.acDevice.dto;

import cn.lihongjie.coal.acDevice.entity.AcDeviceEntity;
import cn.lihongjie.coal.base.dto.OrgCommonDto;
import cn.lihongjie.coal.errorMsg.ErrorMsgCode;
import cn.lihongjie.coal.validator.OrgUniq;
import cn.lihongjie.coal.validator.RequireCode;
import cn.lihongjie.coal.validator.RequireName;

import jakarta.persistence.ManyToOne;

import lombok.Data;

import org.hibernate.annotations.Comment;

@Data
@RequireName
@RequireCode
@OrgUniq(fields = {"code"}, message = ErrorMsgCode.UNIQ_CODE, entityClass = AcDeviceEntity.class)
@OrgUniq(fields = {"name"}, message = ErrorMsgCode.UNIQ_NAME, entityClass = AcDeviceEntity.class)
public class UpdateAcDeviceDto extends OrgCommonDto {

    @ManyToOne
    String supplier;

    @ManyToOne
    String dataCollector;

    @Comment("设备类型")
    private String deviceType;



    private String location;
}
