documentation updates from jason
[freeside.git] / htdocs / docs / schema.html
index 6f4d999..c617817 100644 (file)
@@ -17,7 +17,7 @@
         <li>typenum - primary key
         <li>atype - name of this agent type
       </ul>
-    <li><a name="cust_bill">cust_bill</a> - Invoices
+    <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>.
       <ul>
         <li>invnum - primary key
         <li>custnum - <a href="#cust_main">customer</a>
@@ -35,7 +35,7 @@
         <li>sdate - starting date
         <li>edate - ending date
       </ul>
-    <li><a name="cust_credit">cust_credit</a> - Credits
+    <li><a name="cust_credit">cust_credit</a> - Credits.  The equivalent of a negative <a href="#cust_bill>cust_bill</a> record.
       <ul>
         <li>crednum - primary key
         <li>custnum - <a href="#cust_main">customer</a>
@@ -65,6 +65,7 @@
         <li>country
         <li>daytime - phone
         <li>night - phone
+        <li>fax - phone
         <li>payby - CARD, BILL, or COMP
         <li>payinfo - card number, P.O.#, or comp issuer
         <li>paydate - expiration date
@@ -77,6 +78,7 @@
         <li>destnum - primary key
         <li>custnum - <a href="#cust_main">customer</a>
         <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)
+      </ul>
     <li><a name="cust_main_county">cust_main_county</a> - Tax rates
       <ul>
         <li>taxnum - primary key
@@ -85,7 +87,7 @@
         <li>country
         <li>tax - % rate
       </ul>
-    <li><a name="cust_pay">cust_pay</a> - Payments
+    <li><a name="cust_pay">cust_pay</a> - Payments.  Money being transferred from a customer.
       <ul>
         <li>paynum - primary key
         <li>invnum - <a href="#cust_bill">invoice</a>
         <li>cancel - (past) cancellation date
         <li>otaker - order taker
       </ul>
-    <li><a name="cust_refund">cust_refund</a> - Refunds
+    <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.
       <ul>
         <li>refundnum - primary key
         <li>crednum - <a href="#cust_credit">credit</a>
         <li>pkgnum - <a href="#cust_pkg">package</a>
         <li>svcpart - <a href="#part_svc">Service definition</a>
       </ul>
+    <li><a name="nas">nas</a> - Network Access Server (terminal server)
+      <ul>
+        <li>nasnum - primary key
+        <li>nas - NAS name
+        <li>nasip - NAS ip address
+        <li>nasfqdn - NAS fully-qualified domain name
+        <li>last - timestamp indicating the last instant the NAS was in a known state (used by the session monitoring).
+      </ul>
     <li><a name="part_pkg">part_pkg</a> - Package definitions
       <ul>
         <li>pkgpart - primary key
       </ul>
     <li><a name="part_referral">part_referral</a> - Referral listing
       <ul>
-        <li>refnum</li> - primary key
-        <li>referral</li> - referral
+        <li>refnum - primary key
+        <li>referral - referral
       </ul>
     <li><a name="part_svc">part_svc</a> - Service definitions
       <ul>
         <li>svcpart - <a href="#part_svc">Service definition</a>
         <li>quantity - quantity of this service that this package includes
       </ul>
+    <li><a name="port">port</a> - individual port on a <a href="#nas">nas</a>
+      <ul>
+        <li>portnum - primary key
+        <li>ip - IP address of this port
+        <li>nasport - port number on the NAS
+        <li>nasnum - <a href="#nas">NAS</a>
+      </ul>
+    <li><a name="prepay_credit">prepay_credit</a>
+      <ul>
+        <li>prepaynum - primary key
+        <li>identifier - text or numeric string used to receive this credit
+        <li>amount - amount of credit
+      </ul>
+    <li><a name="session">session</a>
+      <ul>
+        <li>sessionnum - primary key
+        <li>portnum - <a href="#port">Port</a>
+        <li>svcnum - <a href="#svc_acct">Account</a>
+        <li>login - timestamp indicating the beginning of this user session.
+        <li>logout - timestamp indicating the end of this user session.  May be null, which indicates a currently open session.
+      </ul>
+
     <li><a name="svc_acct">svc_acct</a> - Accounts
       <ul>
         <li>svcnum - <a href="#cust_svc">primary key</a>
         <li>state
         <li>ac - area code
         <li>exch - exchange
+        <li>loc - rest of number
       </ul>
     <li><a name="svc_acct_sm">svc_acct_sm</a> - Domain mail aliases
       <ul>
         <li>svcnum - <a href="#cust_svc">primary key</a>
         <li>domain
       </ul>
+    <li><a name="domain_record">domain_record</a> - Domain zone detail
+      <ul>
+        <li>recnum - primary key
+        <li>svcnum - <a href="#svc_domain">Domain</a> (by svcnum)
+        <li>reczone - zone for this line
+        <li>recaf - address family, usually <b>IN</b>
+        <li>rectype - type for this record (<b>A</b>, <b>MX</b>, etc.)
+        <li>recdata - data for this record
+      </ul>
+    <li><a name="svc_www">svc_www</a>
+       <li>svcnum - <a href="#cust-svc">primary key</a>
+       <li>recnum - <a href="#domain_record">host</a>
+       <li>usersvc - <a href="#svc_acct">account</a>
+     </ul>
     <li><a name="type_pkgs">type_pkgs</a>
       <ul>
         <li>typenum - <a href="#agent_type">agent type</a>