/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * license agreements; and to You under the Apache License, version 2.0:
 *
 *   https://www.apache.org/licenses/LICENSE-2.0
 *
 * This file is part of the Apache Pekko project, which was derived from Akka.
 */

/*
 * Copyright (C) 2018-2022 Lightbend Inc. <https://www.lightbend.com>
 */

package jdocs.org.apache.pekko.persistence.typed.auction;

import java.time.Instant;
import java.util.UUID;

/** An auction. */
public final class Auction {
  /** The item under auction. */
  private final UUID itemId;
  /** The user that created the item. */
  private final UUID creator;
  /** The reserve price of the auction. */
  private final int reservePrice;
  /** The minimum increment between bids. */
  private final int increment;
  /** The time the auction started. */
  private final Instant startTime;
  /** The time the auction will end. */
  private final Instant endTime;

  public Auction(
      UUID itemId,
      UUID creator,
      int reservePrice,
      int increment,
      Instant startTime,
      Instant endTime) {
    this.itemId = itemId;
    this.creator = creator;
    this.reservePrice = reservePrice;
    this.increment = increment;
    this.startTime = startTime;
    this.endTime = endTime;
  }

  public UUID getItemId() {
    return itemId;
  }

  public UUID getCreator() {
    return creator;
  }

  public int getReservePrice() {
    return reservePrice;
  }

  public int getIncrement() {
    return increment;
  }

  public Instant getStartTime() {
    return startTime;
  }

  public Instant getEndTime() {
    return endTime;
  }
}
