Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package example
- sealed trait ApiResult
- object ApiResult {
- /* Returns all notes */
- case class ListNotes(notes: Seq[Note]) extends ApiResult
- /* Returns a specific note found */
- case class FoundNote(note: Note) extends ApiResult
- /* Indicates when a specified note cannot be found */
- case class NoteNotFound(id: Int) extends ApiResult
- /* Indicates when a note is successfully created */
- case class CreatedNote(note: Note) extends ApiResult
- /* Indicates when a note is successfully updated */
- case class UpdatedNote(updatedNote: Note) extends ApiResult
- /* Indicates when a note is sucessfully deleted. */
- case class DeletedNote(deletedNote: Note) extends ApiResult
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement