I am dipping my feet into event sourcing pattern and trying to make sense of aggregates.I have read a few blogs and now I am more confused than ever before.

From what I inferred aggregates should somehow enable user to run different queries on the event store to retrieve different stream of events.

Use case :

1. I want to **replay** events on an invoice where the I want to see all actions done by a specific employee on the balance.
2. I want to **replay all** events on an invoice

I hope these are valid use cases.

Event Store:

```
| event_id | invoice_id | EmployeeId | Event            | Payload |
|----------|------------|------------|------------------|---------|
| 1        | 12345      | 12345      | Invoice_InReview | JSON    |
| 2        | 12345      | 12345      | Invoice_Billed   | JSON    |
| 3        | 12345      | 45567      | Invoice_Paid     | JSON    |
| 4        | 12345      | 77341      | Invoice_Reversed | JSON    |
| 5        | 12345      | 98421      | Invoice_Paid     | JSON    |

```

JSON contains info about changes to payment,adjustment and status of invoice
Status is(Review,Billed,Paid)

So from my understanding there needs to be 5 components . 

1. Event- A specific event.
2. Event Source - The service that calls repo to get related events
3. Event Stream - A list of events
4. Command - A request operation on invoice
5. Aggregate - An api to decide on inputs to load events

I understand how other things play but having a hard time wrapping my head around Aggregate. What is it ?

Will I have two aggregate classes 

* AggregateEventsByInvoice
* AggregateEventsByInvoiceEmployee

I really am having a hard time figuring out the need and use of aggregate . All the examples I have seen use UUID which does not make sense to me at all? Any help will be greatly appreciated.