2 <title>Schema reference</title>
5 <h1>Schema reference</h1>
7 <li><a name="agent">agent</a> - Agents are resellers of your service. Agents may be limited to a subset of your full offerings (via their agent type).
9 <li>agentnum - primary key
10 <li>agent - name of this agent
11 <li>typenum - <a href="#agent_type">agent type</a>
12 <li>prog - (unimplemented)
13 <li>freq - (unimplemented)
15 <li><a name="agent_type">agent_type</a> - Agent types define groups of packages that you can then assign to particular agents.
17 <li>typenum - primary key
18 <li>atype - name of this agent type
20 <li><a name="cust_bill">cust_bill</a> - Invoices
22 <li>invnum - primary key
23 <li>custnum - <a href="#cust_main">customer</a>
25 <li>charged - amount of this invoice
26 <li>owed - amount still outstanding on this invoice
27 <li>printed - how many times this invoice has been printed automatically
29 <li><a name="cust_bill_pkg">cust_bill_pkg</a> - Invoice line items
31 <li>invnum - (multiple) key
32 <li>pkgnum - <a href="#cust_pkg">package</a>
34 <li>recur - recurring fee
35 <li>sdate - starting date
36 <li>edate - ending date
38 <li><a name="cust_credit">cust_credit</a> - Credits
40 <li>crednum - primary key
41 <li>custnum - <a href="#cust_main">customer</a>
42 <li>amount - amount credited
43 <li>credited - amount still outstanding (not yet refunded) on this credit
45 <li>otaker - order taker
48 <li><a name="cust_main">cust_main</a> - Customers
50 <li>custnum - primary key
51 <li>agentnum - <a href="#agent">agent</a>
52 <li>refnum - <a href="#part_referral">referral</a>
53 <li>titlenum - <a href="#part_title">title</a>
57 <li>ss - social security number
69 <li>payby - CARD, BILL, or COMP
70 <li>payinfo - card number, P.O.#, or comp issuer
71 <li>paydate - expiration date
72 <li>payname - billing name (name on card)
73 <li>tax - tax exempt, Y or null
74 <li>otaker - order taker
76 <li><a name="cust_main_invoice">cust_main_invoice</a> - Invoice destinations for email invoices
78 <li>destnum - primary key
79 <li>custnum - <a href="#cust_main">customer</a>
80 <li>dest - Invoice destination: If numeric, a <a href="#svc_acct">svcnum</a>, if string, a literal email address, or `POST' to enable mailing (the default if no cust_main_invoice records exist)
82 <li><a name="cust_main_county">cust_main_county</a> - Tax rates
84 <li>taxnum - primary key
90 <li><a name="cust_pay">cust_pay</a> - Payments
92 <li>paynum - primary key
93 <li>invnum - <a href="#cust_bill">invoice</a>
96 <li>payby - CARD, BILL, or COMP
97 <li>payinfo - card number, P.O.#, or comp issuer
98 <li>paybatch - text field for tracking card processor batches
100 <li><a name="cust_pay_batch">cust_pay_batch</a> - Pending batch
102 <li>trancode - 77 for charges
104 <li>exp - card expiration
106 <li>invnum - <a href="#cust_bill">invoice</a>
107 <li>custnum - <a href="#cust_main">customer</a>
108 <li>payname - name on card
118 <li><a name="cust_pkg">cust_pkg</a> - Customer billing items
120 <li>pkgnum - primary key
121 <li>custnum - <a href="#cust_main">customer</a>
122 <li>pkgpart - <a href="#part_pkg">Package definition</a>
124 <li>bill - next bill date
125 <li>susp - (past) suspension date
126 <li>expire - (future) cancellation date
127 <li>cancel - (past) cancellation date
128 <li>otaker - order taker
130 <li><a name="cust_refund">cust_refund</a> - Refunds
132 <li>refundnum - primary key
133 <li>crednum - <a href="#cust_credit">credit</a>
136 <li>payby - CARD, BILL or COMP
137 <li>payinfo - card number, P.O.#, or comp issuer
138 <li>otaker - order taker
140 <li><a name="cust_svc">cust_svc</a> - Customer services
142 <li>svcnum - primary key
143 <li>pkgnum - <a href="#cust_pkg">package</a>
144 <li>svcpart - <a href="#part_svc">Service definition</a>
146 <li><a name="part_pkg">part_pkg</a> - Package definitions
148 <li>pkgpart - primary key
149 <li>pkg - package name
150 <li>comment - non-customer visable package comment
151 <li>setup - setup fee
152 <li>freq - recurring frequency (months)
153 <li>recur - recurring fee
155 <li><a name="part_referral">part_referral</a> - Referral listing
157 <li>refnum - primary key
158 <li>referral - referral
160 <li><a name="part_svc">part_svc</a> - Service definitions
162 <li>svcpart - primary key
163 <li>svc - name of this service
164 <li>svcdb - table used for this service: svc_acct, svc_acct_sm, svc_domain, svc_charge or svc_wo
165 <li><i>table</i>__<i>field</i> - Default or fixed value for <i>field</i> in <i>table</i>
166 <li><i>table</i>__<i>field</i>_flag - null, D or F
168 <li><a name="part_title">part_title</a> - Personal titles
170 <li>titlenum - primary key
171 <li>title - personal title (`Dr.' or `Mr.')
173 <li><a name="pkg_svc">pkg_svc</a>
175 <li>pkgpart - <a href="#part_pkg">Package definition</a>
176 <li>svcpart - <a href="#part_svc">Service definition</a>
177 <li>quantity - quantity of this service that this package includes
179 <li><a name="prepay_credit">prepay_credit</a>
181 <li>prepaynum - primary key
182 <li>identifier - text or numeric string used to receive this credit
183 <li>amount - amount of credit
185 <li><a name="svc_acct">svc_acct</a> - Accounts
187 <li>svcnum - <a href="#cust_svc">primary key</a>
190 <li>popnum - <a href="#svc_acct_pop">Point of Presence</a>
196 <li>quota - (unimplementd)
197 <li>slipip - IP address
198 <li>radius_<i>Radius_Attribute</i> - Radius-Attribute
200 <li><a name="svc_acct_pop">svc_acct_pop</a> - Points of Presence
202 <li>popnum - primary key
207 <li>loc - rest of number
209 <li><a name="svc_acct_sm">svc_acct_sm</a> - Domain mail aliases
211 <li>svcnum - <a href="#cust_svc">primary key</a>
212 <li>domsvc - <a href="#svc_domain">Domain</a> (by svcnum)
213 <li>domuid - <a href="#svc_acct">Account</a> (by uid)
214 <li>domuser - domuser @ <a href="#svc_domain">Domain</a> forwards to <a href="#svc_acct">Account</a>
216 <li><a name="svc_domain">svc_domain</a> - Domains
218 <li>svcnum - <a href="#cust_svc">primary key</a>
221 <li><a name="domain_record">domain_record</a> - Domain zone detail
223 <li>recnum - primary key
224 <li>svcnum - <a href="#svc_domain">Domain</a> (by svcnum)
225 <li>reczone - zone for this line
226 <li>recaf - address family, usually <b>IN</b>
227 <li>rectype - type for this record (<b>A</b>, <b>MX</b>, etc.)
228 <li>recdata - data for this record
230 <li><a name="svc_www">svc_www</a>
231 <li>svcnum - <a href="#cust-svc">primary key</a>
232 <li>recnum - <a href="#domain_record">host</a>
233 <li>usersvc - <a href="#svc_acct">account</a>
235 <li><a name="type_pkgs">type_pkgs</a>
237 <li>typenum - <a href="#agent_type">agent type</a>
238 <li>pkgpart - <a href="#part_pkg">Package definition</a>