package com.bizzan.bitrade.entity;

import lombok.Data;

import javax.persistence.*;
import java.util.Date;

@Entity
@Data
@Table(
    name = "member_announcement_read",
    uniqueConstraints = @UniqueConstraint(columnNames = {"member_id", "announcement_id"})
)
public class MemberAnnouncementRead {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @Column(name = "member_id", nullable = false)
    private Long memberId;

    @Column(name = "announcement_id", nullable = false)
    private Long announcementId;

    @Column(name = "read_time")
    private Date readTime;
}
