package es.uv.dagarcos.master.domain;

import jakarta.persistence.*;
import java.time.Instant;

@Entity
@Table(
    name = "shard_player_stats",
    uniqueConstraints = {
        @UniqueConstraint(columnNames = {"shard_id", "player_id"})
    }
)
public class ShardPlayerStats {

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

    private long score;

    private long totalActions;
    private long explores;
    private long gathers;
    private long fights;
    private long rests;

    private Instant lastUpdatedAt;

    @ManyToOne(fetch = FetchType.LAZY, optional = false)
    private Shard shard;

    @ManyToOne(fetch = FetchType.LAZY, optional = false)
    private PlayerGlobal player;

    public ShardPlayerStats() {}

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public long getScore() {
        return score;
    }

    public void setScore(long score) {
        this.score = score;
    }

    public long getTotalActions() {
        return totalActions;
    }

    public void setTotalActions(long totalActions) {
        this.totalActions = totalActions;
    }

    public long getExplores() {
        return explores;
    }

    public void setExplores(long explores) {
        this.explores = explores;
    }

    public long getGathers() {
        return gathers;
    }

    public void setGathers(long gathers) {
        this.gathers = gathers;
    }

    public long getFights() {
        return fights;
    }

    public void setFights(long fights) {
        this.fights = fights;
    }

    public long getRests() {
        return rests;
    }

    public void setRests(long rests) {
        this.rests = rests;
    }

    public Instant getLastUpdatedAt() {
        return lastUpdatedAt;
    }

    public void setLastUpdatedAt(Instant lastUpdatedAt) {
        this.lastUpdatedAt = lastUpdatedAt;
    }

    public Shard getShard() {
        return shard;
    }

    public void setShard(Shard shard) {
        this.shard = shard;
    }

    public PlayerGlobal getPlayer() {
        return player;
    }

    public void setPlayer(PlayerGlobal player) {
        this.player = player;
    }

    
}