🆕 implement AuctionStatistic (V3 ver)

Took 4 minutes
This commit is contained in:
Kiran Hart 2023-10-27 10:45:14 -04:00
parent 07ece598fd
commit c411c95fe7
No known key found for this signature in database
GPG Key ID: 5F36C7BC79D3EBC3

View File

@ -0,0 +1,72 @@
/*
* Auction House
* Copyright 2023 Kiran Hart
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package ca.tweetzy.auctionhouse.impl;
import ca.tweetzy.auctionhouse.api.statistic.Statistic;
import ca.tweetzy.auctionhouse.auction.enums.AuctionStatisticType;
import lombok.AllArgsConstructor;
import lombok.NonNull;
import java.util.UUID;
import java.util.function.Consumer;
@AllArgsConstructor
public final class AuctionStatistic implements Statistic {
private final UUID id;
private final AuctionStatisticType type;
private final UUID owner;
private final double value;
private final long createdAt;
@Override
public @NonNull UUID getId() {
return this.id;
}
@Override
public @NonNull AuctionStatisticType getType() {
return this.type;
}
@Override
public @NonNull UUID getOwner() {
return this.owner;
}
@Override
public double getValue() {
return this.value;
}
@Override
public long getTimeCreated() {
return this.createdAt;
}
@Override
public long getLastUpdated() {
return this.getTimeCreated();
}
@Override
public void store(Consumer<Statistic> stored) {
}
}