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_county">cust_main_county</a> - Tax rates
77 <li>taxnum - primary key
83 <li><a name="cust_pay">cust_pay</a> - Payments
85 <li>paynum - primary key
86 <li>invnum - <a href="#cust_bill">invoice</a>
89 <li>payby - CARD, BILL, or COMP
90 <li>payinfo - card number, P.O.#, or comp issuer
91 <li>paybatch - text field for tracking card processor batches
93 <li><a name="cust_pay_batch">cust_pay_batch</a> - Pending batch
95 <li>trancode - 77 for charges
97 <li>exp - card expiration
99 <li>invnum - <a href="#cust_bill">invoice</a>
100 <li>custnum - <a href="#cust_main">customer</a>
101 <li>payname - name on card
111 <li><a name="cust_pkg">cust_pkg</a> - Customer billing items
113 <li>pkgnum - primary key
114 <li>custnum - <a href="#cust_main">customer</a>
115 <li>pkgpart - <a href="#part_pkg">Package definition</a>
117 <li>bill - next bill date
118 <li>susp - (past) suspension date
119 <li>expire - (future) cancellation date
120 <li>cancel - (past) cancellation date
121 <li>otaker - order taker
123 <li><a name="cust_refund">cust_refund</a> - Refunds
125 <li>refundnum - primary key
126 <li>crednum - <a href="#cust_credit">credit</a>
129 <li>payby - CARD, BILL or COMP
130 <li>payinfo - card number, P.O.#, or comp issuer
131 <li>otaker - order taker
133 <li><a name="cust_svc">cust_svc</a> - Customer services
135 <li>svcnum - primary key
136 <li>pkgnum - <a href="#cust_pkg">package</a>
137 <li>svcpart - <a href="#part_svc">Service definition</a>
139 <li><a name="part_pkg">part_pkg</a> - Package definitions
141 <li>pkgpart - primary key
142 <li>pkg - package name
143 <li>comment - non-customer visable package comment
144 <li>setup - setup fee
145 <li>freq - recurring frequency (months)
146 <li>recur - recurring fee
148 <li><a name="part_referral">part_referral</a> - Referral listing
150 <li>refnum</li> - primary key
151 <li>referral</li> - referral
153 <li><a name="part_svc">part_svc</a> - Service definitions
155 <li>svcpart - primary key
156 <li>svc - name of this service
157 <li>svcdb - table used for this service: svc_acct, svc_acct_sm, svc_domain, svc_charge or svc_wo
158 <li><i>table</i>__<i>field</i> - Default or fixed value for <i>field</i> in <i>table</i>
159 <li><i>table</i>__<i>field</i>_flag - null, D or F
161 <li><a name="part_title">part_title</a> - Personal titles
163 <li>titlenum - primary key
164 <li>title - personal title (`Dr.' or `Mr.')
166 <li><a name="pkg_svc">pkg_svc</a>
168 <li>pkgpart - <a href="#part_pkg">Package definition</a>
169 <li>svcpart - <a href="#part_svc">Service definition</a>
170 <li>quantity - quantity of this service that this package includes
172 <li><a name="svc_acct">svc_acct</a> - Accounts
174 <li>svcnum - <a href="#cust_svc">primary key</a>
177 <li>popnum - <a href="#svc_acct_pop">Point of Presence</a>
183 <li>quota - (unimplementd)
184 <li>slipip - IP address
185 <li>radius_<i>Radius_Attribute</i> - Radius-Attribute
187 <li><a name="svc_acct_pop">svc_acct_pop</a> - Points of Presence
189 <li>popnum - primary key
195 <li><a name="svc_acct_sm">svc_acct_sm</a> - Domain mail aliases
197 <li>svcnum - <a href="#cust_svc">primary key</a>
198 <li>domsvc - <a href="#svc_domain">Domain</a> (by svcnum)
199 <li>domuid - <a href="#svc_acct">Account</a> (by uid)
200 <li>domuser - domuser @ <a href="#svc_domain">Domain</a> forwards to <a href="#svc_acct">Account</a>
202 <li><a name="svc_domain">svc_domain</a> - Domains
204 <li>svcnum - <a href="#cust_svc">primary key</a>
207 <li><a name="type_pkgs">type_pkgs</a>
209 <li>typenum - <a href="#agent_type">agent type</a>
210 <li>pkgpart - <a href="#part_pkg">Package definition</a>