Floorplan Updated

This commit is contained in:
2021-11-09 17:16:29 +10:00
parent 49fcdabf0f
commit 61481ad87c
37 changed files with 1862 additions and 1762 deletions

View File

@@ -3,9 +3,9 @@
open System
open DredgeFramework
open Dapper.FSharp
[<CLIMutable>]
type reservation = {
reservation_id: int
id: int
reservation_name: string
reservation_time: int
reservation_covers: int
@@ -16,13 +16,21 @@ type reservation = {
let GetReservationById (id: int) =
select {
table "reservations"
where (eq "reservation_id" id)
where (eq "id" id)
}
|> db.Select<reservation>
|> first
let updateReservation (reservation: reservation) =
update{
table "reservations"
set reservation
where(eq "id" reservation.id)
} |> db.Update |> ignore
reservation
let DeleteReservation (tableId: int) =
delete {
table "reservations"
where (eq "table_id" tableId)
where (eq "reservation_table_id" tableId)
} |> db.Delete |> ignore