mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 14:38:52 +00:00
Database design, start callback-based implementation planning
This commit is contained in:
1 parent
0446db39c5
commit
8e7d5e74a0
17 files changed
+672
-92
No files matched your search
@@ -2,26 +2,40 @@ package net.william278.huskhomes.position;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
* Represents metadata about a {@link Position}, used in {@link SavedPosition} implementations
|
||||
*/
|
||||
public class PositionMeta {
|
||||
|
||||
/**
|
||||
* The name of this position
|
||||
* The name of a position
|
||||
*/
|
||||
@NotNull
|
||||
public String name;
|
||||
|
||||
/**
|
||||
* A description of this position
|
||||
* A description of a position
|
||||
*/
|
||||
@NotNull
|
||||
public String description;
|
||||
|
||||
/**
|
||||
* The epoch timestamp of a position's creation
|
||||
*/
|
||||
public long timestamp;
|
||||
|
||||
public PositionMeta(@NotNull String name, @NotNull String description, long timestamp) {
|
||||
this.name = name;
|
||||
this.description = description;
|
||||
this.timestamp = timestamp;
|
||||
}
|
||||
|
||||
public PositionMeta(@NotNull String name, @NotNull String description) {
|
||||
this.name = name;
|
||||
this.description = description;
|
||||
this.timestamp = Instant.now().getEpochSecond();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user