package de.oaa.xxx.games.chastity.cardlock;

import java.time.LocalDateTime;
import java.util.List;

import de.oaa.xxx.games.chastity.common.BaseLockEntity;
import de.oaa.xxx.games.chastity.tasks.Task;
import de.oaa.xxx.games.chastity.tasks.TaskListConverter;
import jakarta.persistence.Column;
import jakarta.persistence.Convert;
import jakarta.persistence.DiscriminatorValue;
import jakarta.persistence.Entity;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@Entity
@DiscriminatorValue("CARDLOCK")
public class CardLockEntity extends BaseLockEntity {


	@Convert(converter = CardEnumListConverter.class)
	@Column(columnDefinition = "TEXT")
	private List<CardEnum> initialCards;
	@Column
	private Integer pickEveryMinute;
	@Column
	private boolean accumulatePicks;
	@Column
	private boolean showRemainingCards;
	@Column
	private LocalDateTime latestOpeningtime;
	
	// State
	@Column
	private LocalDateTime nextCardIn;
	@Column
	private Integer openPicks;
	@Convert(converter = CardEnumListConverter.class)
	@Column(columnDefinition = "TEXT")
	private List<CardEnum> availableCards;

	@Convert(converter = TaskListConverter.class)
	@Column(columnDefinition = "TEXT")
	private List<Task> tasksInQueue;
}
