58 lines
1.7 KiB
Java
58 lines
1.7 KiB
Java
package com.alterdekim.game.entity;
|
|
|
|
|
|
import com.alterdekim.game.xml.NumericBooleanSerializer;
|
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
import com.fasterxml.jackson.annotation.JsonRootName;
|
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
|
import jakarta.persistence.*;
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.Getter;
|
|
import lombok.NoArgsConstructor;
|
|
import lombok.Setter;
|
|
|
|
import java.util.Date;
|
|
|
|
@Getter
|
|
@Setter
|
|
@NoArgsConstructor
|
|
@AllArgsConstructor
|
|
@Entity
|
|
@Table(name="miniquests")
|
|
@JsonRootName(value = "i")
|
|
public class Miniquest {
|
|
@Id
|
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
@JacksonXmlProperty(localName = "Id")
|
|
private Long id;
|
|
|
|
@JsonIgnore
|
|
@Column(nullable = false)
|
|
@JsonSerialize(using= NumericBooleanSerializer.class)
|
|
private Boolean isTask;
|
|
|
|
@JacksonXmlProperty(isAttribute = true, localName = "MiniquestId")
|
|
@Column(nullable = false)
|
|
private Long miniquestId;
|
|
|
|
@JacksonXmlProperty(isAttribute = true, localName = "IsPostponed")
|
|
@Column(nullable = false)
|
|
@JsonSerialize(using= NumericBooleanSerializer.class)
|
|
private Boolean isPostponed;
|
|
|
|
@JacksonXmlProperty(isAttribute = true, localName = "IsFinished")
|
|
@Column(nullable = false)
|
|
@JsonSerialize(using= NumericBooleanSerializer.class)
|
|
private Boolean isFinished;
|
|
|
|
@JacksonXmlProperty(isAttribute = true, localName = "StartDate")
|
|
@Column(nullable = false)
|
|
private String startDate;
|
|
|
|
@JacksonXmlProperty(isAttribute = true, localName = "Counter")
|
|
@Column(nullable = false)
|
|
private Integer counter;
|
|
}
|