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
68 <li>payby - CARD, BILL, or COMP
69 <li>payinfo - card number, P.O.#, or comp issuer
70 <li>paydate - expiration date
71 <li>payname - billing name (name on card)
72 <li>tax - tax exempt, Y or null
73 <li>otaker - order taker
75 <li><a name="cust_main_invoice">cust_main_invoice</a> - Invoice destinations for email invoices
77 <li>destnum - primary key
78 <li>custnum - <a href="#cust_main">customer</a>
79 <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)
81 <li><a name="cust_main_county">cust_main_county</a> - Tax rates
83 <li>taxnum - primary key
89 <li><a name="cust_pay">cust_pay</a> - Payments
91 <li>paynum - primary key
92 <li>invnum - <a href="#cust_bill">invoice</a>
95 <li>payby - CARD, BILL, or COMP
96 <li>payinfo - card number, P.O.#, or comp issuer
97 <li>paybatch - text field for tracking card processor batches
99 <li><a name="cust_pay_batch">cust_pay_batch</a> - Pending batch
101 <li>trancode - 77 for charges
103 <li>exp - card expiration
105 <li>invnum - <a href="#cust_bill">invoice</a>
106 <li>custnum - <a href="#cust_main">customer</a>
107 <li>payname - name on card
117 <li><a name="cust_pkg">cust_pkg</a> - Customer billing items
119 <li>pkgnum - primary key
120 <li>custnum - <a href="#cust_main">customer</a>
121 <li>pkgpart - <a href="#part_pkg">Package definition</a>
123 <li>bill - next bill date
124 <li>susp - (past) suspension date
125 <li>expire - (future) cancellation date
126 <li>cancel - (past) cancellation date
127 <li>otaker - order taker
129 <li><a name="cust_refund">cust_refund</a> - Refunds
131 <li>refundnum - primary key
132 <li>crednum - <a href="#cust_credit">credit</a>
135 <li>payby - CARD, BILL or COMP
136 <li>payinfo - card number, P.O.#, or comp issuer
137 <li>otaker - order taker
139 <li><a name="cust_svc">cust_svc</a> - Customer services
141 <li>svcnum - primary key
142 <li>pkgnum - <a href="#cust_pkg">package</a>
143 <li>svcpart - <a href="#part_svc">Service definition</a>
145 <li><a name="part_pkg">part_pkg</a> - Package definitions
147 <li>pkgpart - primary key
148 <li>pkg - package name
149 <li>comment - non-customer visable package comment
150 <li>setup - setup fee
151 <li>freq - recurring frequency (months)
152 <li>recur - recurring fee
154 <li><a name="part_referral">part_referral</a> - Referral listing
156 <li>refnum</li> - primary key
157 <li>referral</li> - referral
159 <li><a name="part_svc">part_svc</a> - Service definitions
161 <li>svcpart - primary key
162 <li>svc - name of this service
163 <li>svcdb - table used for this service: svc_acct, svc_acct_sm, svc_domain, svc_charge or svc_wo
164 <li><i>table</i>__<i>field</i> - Default or fixed value for <i>field</i> in <i>table</i>
165 <li><i>table</i>__<i>field</i>_flag - null, D or F
167 <li><a name="part_title">part_title</a> - Personal titles
169 <li>titlenum - primary key
170 <li>title - personal title (`Dr.' or `Mr.')
172 <li><a name="pkg_svc">pkg_svc</a>
174 <li>pkgpart - <a href="#part_pkg">Package definition</a>
175 <li>svcpart - <a href="#part_svc">Service definition</a>
176 <li>quantity - quantity of this service that this package includes
178 <li><a name="svc_acct">svc_acct</a> - Accounts
180 <li>svcnum - <a href="#cust_svc">primary key</a>
183 <li>popnum - <a href="#svc_acct_pop">Point of Presence</a>
189 <li>quota - (unimplementd)
190 <li>slipip - IP address
191 <li>radius_<i>Radius_Attribute</i> - Radius-Attribute
193 <li><a name="svc_acct_pop">svc_acct_pop</a> - Points of Presence
195 <li>popnum - primary key
201 <li><a name="svc_acct_sm">svc_acct_sm</a> - Domain mail aliases
203 <li>svcnum - <a href="#cust_svc">primary key</a>
204 <li>domsvc - <a href="#svc_domain">Domain</a> (by svcnum)
205 <li>domuid - <a href="#svc_acct">Account</a> (by uid)
206 <li>domuser - domuser @ <a href="#svc_domain">Domain</a> forwards to <a href="#svc_acct">Account</a>
208 <li><a name="svc_domain">svc_domain</a> - Domains
210 <li>svcnum - <a href="#cust_svc">primary key</a>
213 <li><a name="type_pkgs">type_pkgs</a>
215 <li>typenum - <a href="#agent_type">agent type</a>
216 <li>pkgpart - <a href="#part_pkg">Package definition</a>