]> gitweb @ CieloNegro.org - blackboard-dns.git/blob - DDNS/DB/Zones.hs
DB thingy
[blackboard-dns.git] / DDNS / DB / Zones.hs
1 {-# OPTIONS_GHC -fcontext-stack48 #-}
2 -- NOTE: use GHC flag -fcontext-stack48 with this module if GHC < 6.8.1
3 ---------------------------------------------------------------------------
4 -- Generated by DB/Direct
5 ---------------------------------------------------------------------------
6 module DDNS.DB.Zones where
7
8 import Database.HaskellDB.DBLayout
9
10 ---------------------------------------------------------------------------
11 -- Table type
12 ---------------------------------------------------------------------------
13
14 type Zones =
15     (RecCons Zone (Expr String)
16      (RecCons Ns (Expr String)
17       (RecCons Owner (Expr String)
18        (RecCons Serial (Expr Int)
19         (RecCons Refresh (Expr Int)
20          (RecCons Retry (Expr Int)
21           (RecCons Expire (Expr Int)
22            (RecCons MinTTL (Expr Int) RecNil))))))))
23
24 ---------------------------------------------------------------------------
25 -- Table
26 ---------------------------------------------------------------------------
27 zones :: Table Zones
28
29 zones = baseTable "zones" $
30         hdbMakeEntry Zone #
31         hdbMakeEntry Ns #
32         hdbMakeEntry Owner #
33         hdbMakeEntry Serial #
34         hdbMakeEntry Refresh #
35         hdbMakeEntry Retry #
36         hdbMakeEntry Expire #
37         hdbMakeEntry MinTTL
38
39 ---------------------------------------------------------------------------
40 -- Fields
41 ---------------------------------------------------------------------------
42 ---------------------------------------------------------------------------
43 -- Zone Field
44 ---------------------------------------------------------------------------
45
46 data Zone = Zone
47
48 instance FieldTag Zone where fieldName _ = "zone"
49
50 zone :: Attr Zone String
51 zone = mkAttr Zone
52
53 ---------------------------------------------------------------------------
54 -- Ns Field
55 ---------------------------------------------------------------------------
56
57 data Ns = Ns
58
59 instance FieldTag Ns where fieldName _ = "ns"
60
61 ns :: Attr Ns String
62 ns = mkAttr Ns
63
64 ---------------------------------------------------------------------------
65 -- Owner Field
66 ---------------------------------------------------------------------------
67
68 data Owner = Owner
69
70 instance FieldTag Owner where fieldName _ = "owner"
71
72 owner :: Attr Owner String
73 owner = mkAttr Owner
74
75 ---------------------------------------------------------------------------
76 -- Serial Field
77 ---------------------------------------------------------------------------
78
79 data Serial = Serial
80
81 instance FieldTag Serial where fieldName _ = "serial"
82
83 serial :: Attr Serial Int
84 serial = mkAttr Serial
85
86 ---------------------------------------------------------------------------
87 -- Refresh Field
88 ---------------------------------------------------------------------------
89
90 data Refresh = Refresh
91
92 instance FieldTag Refresh where fieldName _ = "refresh"
93
94 refresh :: Attr Refresh Int
95 refresh = mkAttr Refresh
96
97 ---------------------------------------------------------------------------
98 -- Retry Field
99 ---------------------------------------------------------------------------
100
101 data Retry = Retry
102
103 instance FieldTag Retry where fieldName _ = "retry"
104
105 retry :: Attr Retry Int
106 retry = mkAttr Retry
107
108 ---------------------------------------------------------------------------
109 -- Expire Field
110 ---------------------------------------------------------------------------
111
112 data Expire = Expire
113
114 instance FieldTag Expire where fieldName _ = "expire"
115
116 expire :: Attr Expire Int
117 expire = mkAttr Expire
118
119 ---------------------------------------------------------------------------
120 -- MinTTL Field
121 ---------------------------------------------------------------------------
122
123 data MinTTL = MinTTL
124
125 instance FieldTag MinTTL where fieldName _ = "minTTL"
126
127 minTTL :: Attr MinTTL Int
128 minTTL = mkAttr MinTTL