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. Declarations that a customer owes you money. The specific charges are itemized in <a href="#cust_billl_pkg">cust_bill_pkg</a>.
22 <li>invnum - primary key
23 <li>custnum - <a href="#cust_main">customer</a>
25 <li>charged - amount of this invoice
26 <li>printed - how many times this invoice has been printed automatically
28 <li><a name="cust_bill_pkg">cust_bill_pkg</a> - Invoice line items
30 <li>invnum - (multiple) key
31 <li>pkgnum - <a href="#cust_pkg">package</a> or 0 for the special virtual sales tax package
33 <li>recur - recurring fee
34 <li>sdate - starting date
35 <li>edate - ending date
37 <li><a name="cust_credit">cust_credit</a> - Credits. The equivalent of a negative <a href="#cust_bill">cust_bill</a> record.
39 <li>crednum - primary key
40 <li>custnum - <a href="#cust_main">customer</a>
41 <li>amount - amount credited
43 <li>otaker - order taker
46 <li><a name="cust_main">cust_main</a> - Customers
48 <li>custnum - primary key
49 <li>agentnum - <a href="#agent">agent</a>
50 <li>refnum - <a href="#part_referral">referral</a>
51 <li>titlenum - <a href="#part_title">title</a>
55 <li>ss - social security number
67 <li>payby - CARD, BILL, or COMP
68 <li>payinfo - card number, P.O.#, or comp issuer
69 <li>paydate - expiration date
70 <li>payname - billing name (name on card)
71 <li>tax - tax exempt, Y or null
72 <li>otaker - order taker
74 <li><a name="cust_main_invoice">cust_main_invoice</a> - Invoice destinations for email invoices. Note that a customer can have many email destinations for their invoice (either literal or via svcnum), but only one postal destination.
76 <li>destnum - primary key
77 <li>custnum - <a href="#cust_main">customer</a>
78 <li>dest - Invoice destination. Freeside supports three types of invoice delivery: send directly to a service defined in Freeside, send to an arbitrary email address, or print the invoice to a printer and have someone send it out via snail mail. Freeside determines which method to use based on the contents of the dest field. If the contents are numeric, a <a href="#svc_acct">svcnum</a> pointing to a valid service is expected in the field. If the contents are a string, a literal email address is expected to be in the field. If the special keyword `POST' is present, the snail mail method is used (which is the default if no cust_main_invoice records exist). Snail mail invoices get their address information from <A name="#cust_main">cust_main</A> and are printed with the printer defined in the configuration files.
80 <li><a name="cust_main_county">cust_main_county</a> - Tax rates
82 <li>taxnum - primary key
88 <li><a name="cust_pay">cust_pay</a> - Payments. Money being transferred from a customer.
90 <li>paynum - primary key
91 <li>invnum - <a href="#cust_bill">invoice</a>
94 <li>payby - CARD, BILL, or COMP
95 <li>payinfo - card number, P.O.#, or comp issuer
96 <li>paybatch - text field for tracking card processor batches
98 <li><a name="cust_pay_batch">cust_pay_batch</a> - Pending batch
100 <li>trancode - 77 for charges
102 <li>exp - card expiration
104 <li>invnum - <a href="#cust_bill">invoice</a>
105 <li>custnum - <a href="#cust_main">customer</a>
106 <li>payname - name on card
116 <li><a name="cust_pkg">cust_pkg</a> - Customer billing items
118 <li>pkgnum - primary key
119 <li>custnum - <a href="#cust_main">customer</a>
120 <li>pkgpart - <a href="#part_pkg">Package definition</a>
122 <li>bill - next bill date
123 <li>susp - (past) suspension date
124 <li>expire - (future) cancellation date
125 <li>cancel - (past) cancellation date
126 <li>otaker - order taker
128 <li><a name="cust_refund">cust_refund</a> - Refunds. The transfer of money to a customer; equivalent to a negative <a href="#cust_pay">cust_pay</a> record.
130 <li>refundnum - primary key
131 <li>crednum - <a href="#cust_credit">credit</a>
134 <li>payby - CARD, BILL or COMP
135 <li>payinfo - card number, P.O.#, or comp issuer
136 <li>otaker - order taker
138 <li><a name="cust_svc">cust_svc</a> - Customer services
140 <li>svcnum - primary key
141 <li>pkgnum - <a href="#cust_pkg">package</a>
142 <li>svcpart - <a href="#part_svc">Service definition</a>
144 <li><a name="nas">nas</a> - Network Access Server (terminal server)
146 <li>nasnum - primary key
148 <li>nasip - NAS ip address
149 <li>nasfqdn - NAS fully-qualified domain name
150 <li>last - timestamp indicating the last instant the NAS was in a known state (used by the session monitoring).
152 <li><a name="part_pkg">part_pkg</a> - Package definitions
154 <li>pkgpart - primary key
155 <li>pkg - package name
156 <li>comment - non-customer visable package comment
157 <li>setup - setup fee
158 <li>freq - recurring frequency (months)
159 <li>recur - recurring fee
161 <li><a name="part_referral">part_referral</a> - Referral listing
163 <li>refnum - primary key
164 <li>referral - referral
166 <li><a name="part_svc">part_svc</a> - Service definitions
168 <li>svcpart - primary key
169 <li>svc - name of this service
170 <li>svcdb - table used for this service: svc_acct, svc_acct_sm, svc_domain, svc_charge or svc_wo
171 <li><i>table</i>__<i>field</i> - Default or fixed value for <i>field</i> in <i>table</i>
172 <li><i>table</i>__<i>field</i>_flag - null, D or F
174 <li><a name="part_title">part_title</a> - Personal titles
176 <li>titlenum - primary key
177 <li>title - personal title (`Dr.' or `Mr.')
179 <li><a name="pkg_svc">pkg_svc</a>
181 <li>pkgpart - <a href="#part_pkg">Package definition</a>
182 <li>svcpart - <a href="#part_svc">Service definition</a>
183 <li>quantity - quantity of this service that this package includes
185 <li><a name="port">port</a> - individual port on a <a href="#nas">nas</a>
187 <li>portnum - primary key
188 <li>ip - IP address of this port
189 <li>nasport - port number on the NAS
190 <li>nasnum - <a href="#nas">NAS</a>
192 <li><a name="prepay_credit">prepay_credit</a>
194 <li>prepaynum - primary key
195 <li>identifier - text or numeric string used to receive this credit
196 <li>amount - amount of credit
198 <li><a name="session">session</a>
200 <li>sessionnum - primary key
201 <li>portnum - <a href="#port">Port</a>
202 <li>svcnum - <a href="#svc_acct">Account</a>
203 <li>login - timestamp indicating the beginning of this user session.
204 <li>logout - timestamp indicating the end of this user session. May be null, which indicates a currently open session.
207 <li><a name="svc_acct">svc_acct</a> - Accounts
209 <li>svcnum - <a href="#cust_svc">primary key</a>
212 <li>popnum - <a href="#svc_acct_pop">Point of Presence</a>
218 <li>quota - (unimplementd)
219 <li>slipip - IP address
220 <li>radius_<i>Radius_Attribute</i> - Radius-Attribute
222 <li><a name="svc_acct_pop">svc_acct_pop</a> - Points of Presence
224 <li>popnum - primary key
229 <li>loc - rest of number
231 <li><a name="svc_acct_sm">svc_acct_sm</a> - Domain mail aliases
233 <li>svcnum - <a href="#cust_svc">primary key</a>
234 <li>domsvc - <a href="#svc_domain">Domain</a> (by svcnum)
235 <li>domuid - <a href="#svc_acct">Account</a> (by uid)
236 <li>domuser - domuser @ <a href="#svc_domain">Domain</a> forwards to <a href="#svc_acct">Account</a>
238 <li><a name="svc_domain">svc_domain</a> - Domains
240 <li>svcnum - <a href="#cust_svc">primary key</a>
243 <li><a name="domain_record">domain_record</a> - Domain zone detail
245 <li>recnum - primary key
246 <li>svcnum - <a href="#svc_domain">Domain</a> (by svcnum)
247 <li>reczone - zone for this line
248 <li>recaf - address family, usually <b>IN</b>
249 <li>rectype - type for this record (<b>A</b>, <b>MX</b>, etc.)
250 <li>recdata - data for this record
252 <li><a name="svc_www">svc_www</a>
254 <li>svcnum - <a href="#cust-svc">primary key</a>
255 <li>recnum - <a href="#domain_record">host</a>
256 <li>usersvc - <a href="#svc_acct">account</a>
258 <li><a name="type_pkgs">type_pkgs</a>
260 <li>typenum - <a href="#agent_type">agent type</a>
261 <li>pkgpart - <a href="#part_pkg">Package definition</a>