package com.test.musichouduan.entity;

import lombok.Data;

import jakarta.persistence.*;
import org.hibernate.annotations.CreationTimestamp;

import java.io.Serializable;
import java.time.LocalDateTime;

@Entity
@Data
@Table(name = "user_like_music")
@IdClass(UserLikeMusic.class)
public class UserLikeMusic implements Serializable {

    private Long id;

    @Id
    @Column(name = "user_id")
    private Long userId;

    @Id
    @Column(name = "music_id")
    private Long musicId;

    @CreationTimestamp
    private LocalDateTime createTime;
}
