Skip to content

Instantly share code, notes, and snippets.

@YordanGeorgiev
Created January 24, 2019 12:14
Show Gist options
  • Save YordanGeorgiev/e5b686f586dcaea726319b44f7031d0e to your computer and use it in GitHub Desktop.
Save YordanGeorgiev/e5b686f586dcaea726319b44f7031d0e to your computer and use it in GitHub Desktop.
[msgs-model-in-scala] a simple msgs model in scala #scala #model #messages #msg #msgs
object Msgs {
case class Msg(
code: Int,
name: String,
description: String = null
)
val infMsgs = List(
Msg(1, "inf-msg-01"),
Msg(2, "inf-msg-02", "inf-msg-desc-02")
)
val wrnMsgs = List(
Msg(1, "wrn-msg-01"),
Msg(2, "wrn-msg-02", "wrn-msg-desc-02")
)
val errMsgs = List(
Msg(1, "err-msg-01"),
Msg(2, "err-msg-02", "err-msg-desc-02")
)
}
object MsgsClient {
println("inf-msg-code : 1" + Msgs.infMsgs(1).name + Msgs.infMsgs(1).description)
println("err-msg-code : 1" + Msgs.errMsgs(1).name + Msgs.errMsgs(1).description)
println("wrn-msg-code : 1" + Msgs.wrnMsgs(1).name + Msgs.wrnMsgs(1).description)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment