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>
55 <li>ss - social security number
66 <li>payby - CARD, BILL, or COMP
67 <li>payinfo - card number, P.O.#, or comp issuer
68 <li>paydate - expiration date
69 <li>payname - billing name (name on card)
70 <li>tax - tax exempt, Y or null
71 <li>otaker - order taker
73 <li><a name="cust_main_county">cust_main_county</a> - Tax rates
75 <li>taxnum - primary key
80 <li><a name="cust_pay">cust_pay</a> - Payments
82 <li>paynum - primary key
83 <li>invnum - <a href="#cust_bill">invoice</a>
86 <li>payby - CARD, BILL, or COMP
87 <li>payinfo - card number, P.O.#, or comp issuer
88 <li>paybatch - text field for tracking card processor batches
90 <li><a name="cust_pay_batch">cust_pay_batch</a> - Pending batch
92 <li>trancode - 77 for charges
94 <li>exp - card expiration
96 <li>invnum - <a href="#cust_bill">invoice</a>
97 <li>custnum - <a href="#cust_main">customer</a>
98 <li>payname - name on card
108 <li><a name="cust_pkg">cust_pkg</a> - Customer billing items
110 <li>pkgnum - primary key
111 <li>custnum - <a href="#cust_main">customer</a>
112 <li>pkgpart - <a href="#part_pkg">Package definition</a>
114 <li>bill - next bill date
115 <li>susp - (past) suspension date
116 <li>expire - (future) cancellation date
117 <li>cancel - (past) cancellation date
118 <li>otaker - order taker
120 <li><a name="cust_refund">cust_refund</a> - Refunds
122 <li>refundnum - primary key
123 <li>crednum - <a href="#cust_credit">credit</a>
126 <li>payby - CARD, BILL or COMP
127 <li>payinfo - card number, P.O.#, or comp issuer
128 <li>otaker - order taker
130 <li><a name="cust_svc">cust_svc</a> - Customer services
132 <li>svcnum - primary key
133 <li>pkgnum - <a href="#cust_pkg">package</a>
134 <li>svcpart - <a href="#part_svc">Service definition</a>
136 <li><a name="part_pkg">part_pkg</a> - Package definitions
138 <li>pkgpart - primary key
139 <li>pkg - package name
140 <li>comment - non-customer visable package comment
141 <li>setup - setup fee
142 <li>freq - recurring frequency (months)
143 <li>recur - recurring fee
145 <li><a name="part_referral">part_referral</a> - Referral listing
147 <li>refnum</li> - primary key
148 <li>referral</li> - referral
150 <li><a name="part_svc">part_svc</a> - Service definitions
152 <li>svcpart - primary key
153 <li>svc - name of this service
154 <li>svcdb - table used for this service: svc_acct, svc_acct_sm, svc_domain, svc_charge or svc_wo
155 <li><i>table</i>__<i>field</i> - Default or fixed value for <i>field</i> in <i>table</i>
156 <li><i>table</i>__<i>field</i>_flag - null, D or F
158 <li><a name="pkg_svc">pkg_svc</a>
160 <li>pkgpart - <a href="#part_pkg">Package definition</a>
161 <li>svcpart - <a href="#part_svc">Service definition</a>
162 <li>quantity - quantity of this service that this package includes
164 <li><a name="svc_acct">svc_acct</a> - Accounts
166 <li>svcnum - <a href="#cust_svc">primary key</a>
169 <li>popnum - <a href="#svc_acct_pop">Point of Presence</a>
175 <li>quota - (unimplementd)
176 <li>slipip - IP address
177 <li>radius_<i>Radius_Attribute</i> - Radius-Attribute
179 <li><a name="svc_acct_pop">svc_acct_pop</a> - Points of Presence
181 <li>popnum - primary key
187 <li><a name="svc_acct_sm">svc_acct_sm</a> - Domain mail aliases
189 <li>svcnum - <a href="#cust_svc">primary key</a>
190 <li>domsvc - <a href="#svc_domain">Domain</a> (by svcnum)
191 <li>domuid - <a href="#svc_acct">Account</a> (by uid)
192 <li>domuser - domuser @ <a href="#svc_domain">Domain</a> forwards to <a href="#svc_acct">Account</a>
194 <li><a name="svc_domain">svc_domain</a> - Domains
196 <li>svcnum - <a href="#cust_svc">primary key</a>
199 <li><a name="type_pkgs">type_pkgs</a>
201 <li>typenum - <a href="#agent_type">agent type</a>
202 <li>pkgpart - <a href="#part_pkg">Package definition</a>