50 lines
1.2 KiB
Java
50 lines
1.2 KiB
Java
package com.alterdekim.game.entity;
|
|
|
|
import jakarta.persistence.*;
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.Getter;
|
|
import lombok.NoArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
@NoArgsConstructor
|
|
@AllArgsConstructor
|
|
@Getter
|
|
@Entity
|
|
@Table(name = "locations")
|
|
public class Location {
|
|
@Id
|
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
private Long id;
|
|
|
|
@Column(nullable = false)
|
|
private Long locationId;
|
|
|
|
@Column(nullable = false)
|
|
private Long mediaResourceId;
|
|
|
|
@Column(nullable = false)
|
|
private Double x;
|
|
|
|
@Column(nullable = false)
|
|
private Double y;
|
|
|
|
@Column(nullable = false, length = 65555)
|
|
private String name;
|
|
|
|
@Column(nullable = false)
|
|
private Boolean isDefault;
|
|
|
|
@Column(nullable = false)
|
|
private Boolean isEnabled;
|
|
|
|
public Location(Long locationId, Long mediaResourceId, Double x, Double y, String name, Boolean isDefault, Boolean isEnabled) {
|
|
this.locationId = locationId;
|
|
this.mediaResourceId = mediaResourceId;
|
|
this.x = x;
|
|
this.y = y;
|
|
this.name = name;
|
|
this.isDefault = isDefault;
|
|
this.isEnabled = isEnabled;
|
|
}
|
|
}
|