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

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

import de.oaa.xxx.games.chastity.common.BaseLockEntity;
import de.oaa.xxx.games.chastity.common.PenaltyType;
import de.oaa.xxx.games.chastity.spinningwheel.SpinningWheelConverter;
import de.oaa.xxx.games.chastity.spinningwheel.SpinningWheelEntry;
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("TIMELOCK")
public class TimeLockEntity extends BaseLockEntity {

	@Column
	private boolean endTimeVisible;
	@Column
	private Integer minTimeInMinutes;
	@Column
	private Integer maxTimeInMinutes;

    @Column
    private Integer taskEveryMinutes;
    @Column
    private Integer minTasksPerDay;  
    
    @Convert(converter = SpinningWheelConverter.class)
    @Column(columnDefinition = "TEXT")
    private List<SpinningWheelEntry> spinningWheelEntries;
    @Column
    private Integer spinsEveryMinutes;
    @Column
    private Integer minSpinsPerDay;
    
    @Column
    private PenaltyType penaltyType;
    @Column 
    private Integer penaltyValue;

	@Column
	private LocalDateTime estimatedUnlockTime;

	@Column
	private LocalDateTime frozenFrom;

	@Column
	private List<LocalDateTime> taskTimes;
	@Column
	private List<LocalDateTime> spinningWheelTimes;
	@Column
	private LocalDate lastCheck;
}
