]> gitweb @ CieloNegro.org - blackboard-dns.git/blobdiff - DDNS/DB/Zones.hs
DB thingy
[blackboard-dns.git] / DDNS / DB / Zones.hs
diff --git a/DDNS/DB/Zones.hs b/DDNS/DB/Zones.hs
new file mode 100644 (file)
index 0000000..69653e4
--- /dev/null
@@ -0,0 +1,128 @@
+{-# OPTIONS_GHC -fcontext-stack48 #-}
+-- NOTE: use GHC flag -fcontext-stack48 with this module if GHC < 6.8.1
+---------------------------------------------------------------------------
+-- Generated by DB/Direct
+---------------------------------------------------------------------------
+module DDNS.DB.Zones where
+
+import Database.HaskellDB.DBLayout
+
+---------------------------------------------------------------------------
+-- Table type
+---------------------------------------------------------------------------
+
+type Zones =
+    (RecCons Zone (Expr String)
+     (RecCons Ns (Expr String)
+      (RecCons Owner (Expr String)
+       (RecCons Serial (Expr Int)
+        (RecCons Refresh (Expr Int)
+         (RecCons Retry (Expr Int)
+          (RecCons Expire (Expr Int)
+           (RecCons MinTTL (Expr Int) RecNil))))))))
+
+---------------------------------------------------------------------------
+-- Table
+---------------------------------------------------------------------------
+zones :: Table Zones
+
+zones = baseTable "zones" $
+        hdbMakeEntry Zone #
+        hdbMakeEntry Ns #
+        hdbMakeEntry Owner #
+        hdbMakeEntry Serial #
+        hdbMakeEntry Refresh #
+        hdbMakeEntry Retry #
+        hdbMakeEntry Expire #
+        hdbMakeEntry MinTTL
+
+---------------------------------------------------------------------------
+-- Fields
+---------------------------------------------------------------------------
+---------------------------------------------------------------------------
+-- Zone Field
+---------------------------------------------------------------------------
+
+data Zone = Zone
+
+instance FieldTag Zone where fieldName _ = "zone"
+
+zone :: Attr Zone String
+zone = mkAttr Zone
+
+---------------------------------------------------------------------------
+-- Ns Field
+---------------------------------------------------------------------------
+
+data Ns = Ns
+
+instance FieldTag Ns where fieldName _ = "ns"
+
+ns :: Attr Ns String
+ns = mkAttr Ns
+
+---------------------------------------------------------------------------
+-- Owner Field
+---------------------------------------------------------------------------
+
+data Owner = Owner
+
+instance FieldTag Owner where fieldName _ = "owner"
+
+owner :: Attr Owner String
+owner = mkAttr Owner
+
+---------------------------------------------------------------------------
+-- Serial Field
+---------------------------------------------------------------------------
+
+data Serial = Serial
+
+instance FieldTag Serial where fieldName _ = "serial"
+
+serial :: Attr Serial Int
+serial = mkAttr Serial
+
+---------------------------------------------------------------------------
+-- Refresh Field
+---------------------------------------------------------------------------
+
+data Refresh = Refresh
+
+instance FieldTag Refresh where fieldName _ = "refresh"
+
+refresh :: Attr Refresh Int
+refresh = mkAttr Refresh
+
+---------------------------------------------------------------------------
+-- Retry Field
+---------------------------------------------------------------------------
+
+data Retry = Retry
+
+instance FieldTag Retry where fieldName _ = "retry"
+
+retry :: Attr Retry Int
+retry = mkAttr Retry
+
+---------------------------------------------------------------------------
+-- Expire Field
+---------------------------------------------------------------------------
+
+data Expire = Expire
+
+instance FieldTag Expire where fieldName _ = "expire"
+
+expire :: Attr Expire Int
+expire = mkAttr Expire
+
+---------------------------------------------------------------------------
+-- MinTTL Field
+---------------------------------------------------------------------------
+
+data MinTTL = MinTTL
+
+instance FieldTag MinTTL where fieldName _ = "minTTL"
+
+minTTL :: Attr MinTTL Int
+minTTL = mkAttr MinTTL