mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-11-28 03:35:45 +03:00
28 lines
578 B
Haskell
28 lines
578 B
Haskell
|
module Fixtures where
|
||
|
|
||
|
import Wasp
|
||
|
|
||
|
taskEntity :: Entity
|
||
|
taskEntity = Entity
|
||
|
{ entityName = "Task"
|
||
|
, entityFields =
|
||
|
[ Wasp.EntityField "description" Wasp.EftString
|
||
|
, Wasp.EntityField "isDone" Wasp.EftBoolean
|
||
|
]
|
||
|
}
|
||
|
|
||
|
taskCreateForm :: EntityForm
|
||
|
taskCreateForm = EntityForm
|
||
|
{ efName = "CreateTaskForm"
|
||
|
, efEntityName = "Task"
|
||
|
, efSubmitConfig = Just EntityFormSubmitConfig
|
||
|
{ onEnter = False
|
||
|
}
|
||
|
}
|
||
|
|
||
|
wasp :: Wasp
|
||
|
wasp = fromWaspElems
|
||
|
[ WaspElementEntity taskEntity
|
||
|
, WaspElementEntityForm taskCreateForm
|
||
|
]
|