aboutsummaryrefslogtreecommitdiff
path: root/src/Model/Degree.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Model/Degree.hs')
-rw-r--r--src/Model/Degree.hs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Model/Degree.hs b/src/Model/Degree.hs
new file mode 100644
index 0000000..90feacc
--- /dev/null
+++ b/src/Model/Degree.hs
@@ -0,0 +1,18 @@
+{-# LANGUAGE DeriveGeneric #-}
+
+module Model.Degree where
+
+import GHC.Generics
+import Data.Yaml
+
+import Model.School
+import Model.Translated
+
+data Degree = Degree
+ { name :: Translated
+ , school :: School
+ , year :: Int
+ , topics :: [Translated]
+ } deriving (Show, Read, Eq, Generic)
+
+instance FromJSON Degree