package com.alterdekim.hearthhack.entity;

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

@Getter
@Setter
@NoArgsConstructor
@Entity
@Table(name = "decks")
public class Deck {

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

    @Column(nullable=false)
    private Long userId;

    @Column(nullable=false)
    private String name;

    @Column(nullable = false)
    private Long cardBack;

    @Column(nullable = false)
    private Integer hero;

    @Column(nullable = false)
    private Integer deckType;

    @Column(nullable = false)
    private Boolean heroPremium;

    @Column(nullable = false)
    private Boolean cardBackOverride;

    @Column(nullable = false)
    private Boolean heroOverride;

    @Column(nullable = false)
    private Long lastModified;

    @Column(nullable = false)
    private Long sortOrder;

    @Column(nullable = false)
    private Integer sourceType;

    public Deck(Long id, Long userId, String name, Long cardBack, Integer hero, Integer deckType, Boolean heroPremium, Boolean cardBackOverride, Boolean heroOverride, Long lastModified, Long sortOrder, Integer sourceType) {
        this.id = id;
        this.userId = userId;
        this.name = name;
        this.cardBack = cardBack;
        this.hero = hero;
        this.deckType = deckType;
        this.heroPremium = heroPremium;
        this.cardBackOverride = cardBackOverride;
        this.heroOverride = heroOverride;
        this.lastModified = lastModified;
        this.sortOrder = sortOrder;
        this.sourceType = sourceType;
    }

    public Deck(Long userId, String name, Long cardBack, Integer hero, Integer deckType, Boolean heroPremium, Boolean cardBackOverride, Boolean heroOverride, Long lastModified, Long sortOrder, Integer sourceType) {
        this.userId = userId;
        this.name = name;
        this.cardBack = cardBack;
        this.hero = hero;
        this.deckType = deckType;
        this.heroPremium = heroPremium;
        this.cardBackOverride = cardBackOverride;
        this.heroOverride = heroOverride;
        this.lastModified = lastModified;
        this.sortOrder = sortOrder;
        this.sourceType = sourceType;
    }
}
