package com.kospo.talk.model;

import jakarta.persistence.*;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@Entity
@Table(name = "code")
public class Code {
    @EmbeddedId
    private CodeId id;

    @ManyToOne(fetch = FetchType.LAZY, optional = false)
    @JoinColumn(name = "id", nullable = false, updatable = false, insertable = false)
    private PCode id1;

    @Size(max = 20)
    @Column(name = "nm", length = 20)
    private String nm;

    @Size(max = 200)
    @Column(name = "description", length = 200)
    private String description;

    @Column(name = "use_yn")
    private Boolean useYn;

}