package com.smyhub.store.mengyastorebackendjava.entity;

import jakarta.persistence.*;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Entity
@Table(name = "wishlists",
        uniqueConstraints = @UniqueConstraint(name = "idx_wishlist", columnNames = {"account_id", "product_id"}))
@Getter
@Setter
@NoArgsConstructor
public class Wishlist {

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

    @Column(name = "account_id", length = 255, nullable = false)
    private String accountId;

    @Column(name = "product_id", length = 36, nullable = false)
    private String productId;

    public Wishlist(String accountId, String productId) {
        this.accountId = accountId;
        this.productId = productId;
    }
}
