Skip to content

Instantly share code, notes, and snippets.

@dsugden
Created January 21, 2013 00:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dsugden/4582823 to your computer and use it in GitHub Desktop.
Save dsugden/4582823 to your computer and use it in GitHub Desktop.
Alternative representations of Article
case class ArticleId(id: Long)
case class ArticleForDisplay(id: Option[Long] = None,
publishedBody: Option[String],
userID: Long,
created: Date,
category: String,
published: Boolean)
case class ArticleForCreation(name: String, body: Option[String], category: ArticleCategory, published: Boolean = false)
case class ArticleForUpdate(id: Long, name: String, body: Option[String], displayOrder: Int)
case class ArticleForTable(id: Option[Long] = None,
name: String,
userID: Long,
userName: String,
created: Date,
published: Boolean = false)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment