package com.oguerreiro.resilient.activity;

import org.hibernate.annotations.Parameter;
import org.hibernate.annotations.Type;

import com.oguerreiro.resilient.domain.AbstractResilientEntity;
import com.oguerreiro.resilient.domain.AbstractResilientLongIdEntity;
import com.oguerreiro.resilient.domain.usertype.ActivityProgressUserType;

import jakarta.persistence.Column;
import jakarta.persistence.MappedSuperclass;

@MappedSuperclass
public abstract class AbstractActivityDomain<T extends AbstractResilientEntity<T, Long>>
    extends AbstractResilientLongIdEntity<T> implements ActivityDomain {
  private static final long serialVersionUID = 1L;

  @Type(value = ActivityProgressUserType.class, parameters = {
      @Parameter(name = "activityDomainClass", value = "com.oguerreiro.resilient.domain.Period") })
  @Column(name = "id", insertable = false, updatable = false)
  private String activityProgressKey;

  public String getActivityProgressKey() {
    return activityProgressKey;
  }

  public void setActivityProgressKey(String activityProgressKey) {
    this.activityProgressKey = activityProgressKey;
  }

}
