Skip to content

Commit

Permalink
feat: create event interface
Browse files Browse the repository at this point in the history
  • Loading branch information
andrea-acampora committed Feb 15, 2023
1 parent 25583fa commit 2294769
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/main/kotlin/entities/events/Event.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Copyright (c) 2023. Smart Operating Block
*
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
*/

package entities.events

/**
* The interface of a generic event.
*/
interface Event<E : Any> {

/**
* The key of the event. Every type of event has its unique key.
*/
val key: String

/**
* The data of the event.
*/
val data: E
}

0 comments on commit 2294769

Please # to comment.