package com.its.op.entity.its.vds;

import com.its.op.dto.its.vds.TbVdsDtctRltnLinkDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.persistence.*;
import java.io.Serializable;

/**
 * VDS 검지기 링크 관계 Entity Class
 */
@Getter
@NoArgsConstructor//(access = AccessLevel.PROTECTED)
@Builder
@AllArgsConstructor
@ApiModel("VDS 검지기 링크 관계")
@Entity
@Table(name = "TB_VDS_DTCT_RLTN_LINK")
//@IdClass(TbVdsDtctLinkRltnKey.class)
public class TbVdsDtctLinkRltn implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("검지기 번호")  // N NUMBER(10)
    @Id
    @Column(name = "VDS_DTCT_NMBR", nullable = false, columnDefinition = "NUMBER", length = 10)
    private Long vdsDtctNmbr;

    @ApiModelProperty("링크ID")  // N NUMBER(10)
    //@Id
    @Column(name = "LINK_ID", nullable = false, columnDefinition = "NUMBER", length = 10)
    private Long linkId;

    public TbVdsDtctRltnLinkDto toDto() {
        return TbVdsDtctRltnLinkDto.builder()
                .vdsDtctNmbr(this.vdsDtctNmbr)
                .linkId(this.linkId)
                .build();
    }

    public void updateInfo(TbVdsDtctRltnLinkDto.TbVdsDtctLinkRltnUpdReq req) {
    }

}
