Browse files

Add a Task.doneAt field (not yet used)

  • Loading branch information...
1 parent c012e06 commit f82bc635679e86f155ab6a9c6cdfbc6198ca761b @samstokes committed Sep 13, 2011
Showing with 4 additions and 1 deletion.
  1. +2 −1 Model.hs
  2. +1 −0 config/models
  3. +1 −0 yesodoro.cabal
View
3 Model.hs
@@ -4,6 +4,7 @@ module Model where
import Yesod
import Data.String (IsString)
import Data.Text (Text)
+import Data.Time
import Database.Persist.GenericSql.Raw (SqlPersist)
import Text.Blaze (ToHtml)
@@ -22,7 +23,7 @@ newtype TaskState = TaskState Text
data NewTask = NewTask { newTaskTitle :: Text } deriving (Show)
newTask :: UserId -> Int -> NewTask -> Task
-newTask uid order (NewTask title) = Task uid title 0 False order
+newTask uid order (NewTask title) = Task uid title 0 False Nothing order
createTaskAtBottom :: PersistBackend SqlPersist m => UserId -> NewTask -> SqlPersist m TaskId
createTaskAtBottom userId task = do
View
1 config/models
@@ -12,6 +12,7 @@ Task
title Text
pomos Int default=0
done Bool default=false
+ doneAt UTCTime Maybe
order Int
UniqueTaskOrder user order
View
1 yesodoro.cabal
@@ -66,6 +66,7 @@ executable yesodoro
, directory
, bytestring
, text
+ , time
, persistent
, persistent-template
, persistent-postgresql >= 0.6 && < 0.7

0 comments on commit f82bc63

Please sign in to comment.