package com.sikey.wa04.business.infrastructure.dto.model;

import jakarta.persistence.*;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.hibernate.annotations.ColumnDefault;

import java.time.Instant;

@Getter
@Setter
@Entity
@Accessors(chain = true)
@Table(name = "tb_contact")
public class ContactModel extends BaseModel {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", nullable = false)
    private Long id;

    @Size(max = 36)
    @Column(name = "child_id", length = 36)
    private String childId;

    @Size(max = 36)
    @NotNull
    @Column(name = "ref_id", nullable = false, length = 36)
    private String refId;

    @NotNull
    @Column(name = "ref_type", nullable = false)
    private Integer refType;

    @Size(max = 125)
    @Column(name = "remark_name", length = 125)
    private String remarkName;

    @Size(max = 255)
    @Column(name = "remark_avatar")
    private String remarkAvatar;

    @NotNull
    @Column(name = "ref_role", nullable = false)
    private Integer refRole;

    @Column(name = "deleted_at")
    private Instant deletedAt;

}