aboutsummaryrefslogtreecommitdiff
path: root/src/client/Model/Payment.elm
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/Model/Payment.elm')
-rw-r--r--src/client/Model/Payment.elm44
1 files changed, 0 insertions, 44 deletions
diff --git a/src/client/Model/Payment.elm b/src/client/Model/Payment.elm
deleted file mode 100644
index c4a8963..0000000
--- a/src/client/Model/Payment.elm
+++ /dev/null
@@ -1,44 +0,0 @@
-module Model.Payment
- ( perPage
- , Payments
- , Payment
- , PaymentId
- , paymentsDecoder
- , paymentIdDecoder
- ) where
-
-import Date exposing (..)
-import Json.Decode as Json exposing ((:=))
-
-import Model.User exposing (UserId, userIdDecoder)
-import Model.Date exposing (dateDecoder)
-
-perPage : Int
-perPage = 8
-
-type alias Payments = List Payment
-
-type alias Payment =
- { id : PaymentId
- , creation : Date
- , name : String
- , cost : Int
- , userId : UserId
- }
-
-type alias PaymentId = Int
-
-paymentsDecoder : Json.Decoder Payments
-paymentsDecoder = Json.list paymentDecoder
-
-paymentDecoder : Json.Decoder Payment
-paymentDecoder =
- Json.object5 Payment
- ("id" := paymentIdDecoder)
- ("creation" := dateDecoder)
- ("name" := Json.string)
- ("cost" := Json.int)
- ("userId" := userIdDecoder)
-
-paymentIdDecoder : Json.Decoder PaymentId
-paymentIdDecoder = Json.int