aboutsummaryrefslogtreecommitdiff
path: root/client/src/model
diff options
context:
space:
mode:
authorJoris2019-05-16 09:40:02 +0200
committerJoris2019-05-16 09:40:02 +0200
commit7bf58894761742d4da8e6f52ce113ea7327e7114 (patch)
tree388785f65e258e956296977cff4bd1f7ac6e1526 /client/src/model
parentf015a216f5ee1e335d5ae90dbc8f3efafdca6fec (diff)
Bootstrap
Diffstat (limited to 'client/src/model')
-rw-r--r--client/src/model/FileRights.scala7
-rw-r--r--client/src/model/Licence.scala8
-rw-r--r--client/src/model/Pose.scala11
-rw-r--r--client/src/model/PoseCategory.scala18
-rw-r--r--client/src/model/Route.scala13
5 files changed, 57 insertions, 0 deletions
diff --git a/client/src/model/FileRights.scala b/client/src/model/FileRights.scala
new file mode 100644
index 0000000..3b91d37
--- /dev/null
+++ b/client/src/model/FileRights.scala
@@ -0,0 +1,7 @@
+package yoga.model
+
+final case class FileRights(
+ licence: Licence,
+ author: String,
+ modification: Option[String] = None
+)
diff --git a/client/src/model/Licence.scala b/client/src/model/Licence.scala
new file mode 100644
index 0000000..883d01d
--- /dev/null
+++ b/client/src/model/Licence.scala
@@ -0,0 +1,8 @@
+package yoga.model
+
+import java.net.URI
+
+final case class Licence(
+ name: String,
+ uri: URI
+)
diff --git a/client/src/model/Pose.scala b/client/src/model/Pose.scala
new file mode 100644
index 0000000..e073466
--- /dev/null
+++ b/client/src/model/Pose.scala
@@ -0,0 +1,11 @@
+package yoga.model
+
+import java.net.URI
+
+final case class Pose(
+ name: String,
+ otherNames: Seq[String] = Nil,
+ category: PoseCategory,
+ image: URI,
+ rights: FileRights
+)
diff --git a/client/src/model/PoseCategory.scala b/client/src/model/PoseCategory.scala
new file mode 100644
index 0000000..95eb974
--- /dev/null
+++ b/client/src/model/PoseCategory.scala
@@ -0,0 +1,18 @@
+package yoga.model
+
+import scala.collection.immutable.IndexedSeq
+
+import enumeratum.{ Enum, EnumEntry }
+
+sealed trait PoseCategory extends EnumEntry
+
+object PoseCategory extends Enum[PoseCategory] {
+
+ case object Standing extends PoseCategory
+ case object Balancing extends PoseCategory
+ case object Sitting extends PoseCategory
+ case object Reclining extends PoseCategory
+
+ val values: IndexedSeq[PoseCategory] = findValues
+
+}
diff --git a/client/src/model/Route.scala b/client/src/model/Route.scala
new file mode 100644
index 0000000..34cb1fc
--- /dev/null
+++ b/client/src/model/Route.scala
@@ -0,0 +1,13 @@
+package yoga.model
+
+import java.net.URI
+
+sealed trait Route
+
+case object Route {
+
+ case object Index extends Route
+ final case class Licence(uri: URI) extends Route
+ final object NotFound extends Route
+
+}