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

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

import java.time.Instant;


@Getter
@Setter
@Entity
@Table(name = "tb_group_member")
@Accessors(chain = true)
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class GroupMemberModel extends BaseModel {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", nullable = false)
    private Long id;

    @Size(max = 36)
    @Column(name = "group_id", length = 36)
    private String groupId;

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

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

    @Column(name = "role")
    private Integer role;

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