libraries are now filtered on id (there are duplicate names, such as "Bookmobile")
[Evergreen.git] / Open-ILS / src / reporter / tables.example.xml
index 86bb884..c72eff7 100644 (file)
@@ -17,6 +17,7 @@
                        </field>
                        <field
                          name="barcode"
+                         widget-family="string-input"
                          datatype="text">
                                <label>Barcode</label>
                                <description>Copy Barcode</description>
                                <description>ID of the Circulating Library</description>
                        </field>
                        <field
+                         name="create_date_day"
+                         datatype="date">
+                               <label>Create Date Joiner</label>
+                               <description>Date of the copy's cataloging</description>
+                       </field>
+                       <field
+                         name="create_date_hour"
+                         datatype="timestamptz">
+                               <label>Create Date and Hour Joiner</label>
+                               <description>Date and Hour of the copy's cataloging</description>
+                       </field>
+<!--
+                       <field
                          name="create_date"
                          datatype="timestamptz"
                          indexed="true"
                                <description>Timestamp of the copy's cataloging</description>
                        </field>
                        <field
+                         name="edit_date"
+                         datatype="timestamptz"
+                         indexed="true"
+                         default="now()">
+                               <label>Edit Date</label>
+                               <description>Timestamp of the copy's last edit</description>
+                       </field>
+-->
+                       <field
+                         name="edit_date_day"
+                         datatype="date">
+                               <label>Edit Date Joiner</label>
+                               <description>Date of the copy's last edit</description>
+                       </field>
+                       <field
+                         name="edit_date_hour"
+                         datatype="timestamptz">
+                               <label>Edit Date and Hour Joiner</label>
+                               <description>Date and Hour of the copy's last edit</description>
+                       </field>
+                       <field
                          name="item_lang"
                          datatype="text">
                                <label>Language</label>
@@ -63,6 +98,8 @@
                        </field>
                        <field
                          name="call_number_label"
+                         transform-group="call_number"
+                         widget-family="string-input"
                          datatype="text">
                                <label>Call Number</label>
                                <description>Copy Call Number Label</description>
 
                <links>
                        <link
+                         field="create_date_day"
+                         table="generic_day_series"
+                         hidden="false"
+                         id="copy_create_day"
+                         key="date"
+                         type="has_a"/>
+                       <link
+                         field="create_date_hour"
+                         table="generic_hour_series"
+                         hidden="false"
+                         id="copy_create_hour"
+                         key="date_hour"
+                         type="has_a"/>
+                       <link
+                         field="edit_date_day"
+                         table="generic_day_series"
+                         hidden="false"
+                         id="copy_edit_day"
+                         key="date"
+                         type="has_a"/>
+                       <link
+                         field="edit_date_hour"
+                         table="generic_hour_series"
+                         hidden="false"
+                         id="copy_edit_hour"
+                         key="date_hour"
+                         type="has_a"/>
+                       <link
                          field="owning_lib"
                          table="org_unit"
+                         hidden="false"
                          id="copy_owning_lib"
                          key="id"
                          type="has_a"/>
                          key="code"
                          type="has_a"/>
                        <link
+                         field="item_form"
+                         table="marc_form_map"
+                         id="copy_item_form"
+                         key="code"
+                         type="has_a"/>
+                       <link
+                         field="item_type"
+                         table="marc_type_map"
+                         id="copy_item_type"
+                         key="code"
+                         type="has_a"/>
+                       <link
                          field="circ_lib"
                          table="org_unit"
                          id="copy_circ_lib"
                        <field
                          name="id"
                          primary="true"
+                         filterable='true'
+                         widget-family="lib-choose"
                          create-type="serial"
                          datatype="int">
-                               <label>ID</label>
-                               <description>Library ID</description>
+                               <label>Unique Library ID</label>
+                               <description>Unique Library ID</description>
                        </field>
                        <field
                          name="name"
+                         widget-family="string-choose"
                          datatype="text">
                                <label>Name</label>
                                <description>Library Name</description>
                        </field>
                        <field
                          name="shortname"
+                         widget-family="string-choose"
                          datatype="text">
                                <label>Short Name</label>
                                <description>Library Short (Policy) Name</description>
                        </field>
                        <field
                          name="value"
+                         widget-family="string-choose"
                          datatype="text">
                                <label>Language Name</label>
                                <description>Name associated with the MARC code</description>
                </fields>
        </table>
 
+       <table id="generic_day_series" partition="false" fact-table="false">
+               <label>Constant day series</label>
+               <description>View providing a day series starting at 1900 and ending at 'now'</description>
+               <tablename>reporter.date_series</tablename>
+
+               <fields>
+                       <field
+                         name="date"
+                         primary='true'
+                         filterable='true'
+                         datatype="timestamptz">
+                               <label>Date</label>
+                               <description>Date</description>
+                       </field>
+               </fields>
+       </table>
+
+       <table id="generic_hour_series" partition="false" fact-table="false">
+               <label>Constant hour series</label>
+               <description>View providing a hour series starting at 1900 and ending at 'now'</description>
+               <tablename>reporter.date_hour_series</tablename>
+
+               <fields>
+                       <field
+                         name="date_hour"
+                         primary='true'
+                         filterable='true'
+                         datatype="timestamptz">
+                               <label>Date and Hour</label>
+                               <description>Date and Hour</description>
+                       </field>
+               </fields>
+       </table>
+
+       <table id="marc_form_map" partition="false" fact-table="false">
+               <label>MARC Item Form Codes</label>
+               <description>Table mapping MARC three character codes to Item Form names</description>
+               <tablename>config.item_form_map</tablename>
+
+               <fields>
+                       <field
+                         name="code"
+                         primary='true'
+                         datatype="text">
+                               <label>Code</label>
+                               <description>MARC Item Form Code</description>
+                       </field>
+                       <field
+                         name="value"
+                         widget-family="string-choose"
+                         datatype="text">
+                               <label>Item Form Name</label>
+                               <description>Name associated with the MARC code</description>
+                       </field>
+               </fields>
+       </table>
+
+       <table id="marc_type_map" partition="false" fact-table="false">
+               <label>MARC Item Type Codes</label>
+               <description>Table mapping MARC three character codes to Item Type names</description>
+               <tablename>config.item_type_map</tablename>
+
+               <fields>
+                       <field
+                         name="code"
+                         primary='true'
+                         datatype="text">
+                               <label>Code</label>
+                               <description>MARC Item Type Code</description>
+                       </field>
+                       <field
+                         name="value"
+                         widget-family="string-choose"
+                         datatype="text">
+                               <label>Item Type Name</label>
+                               <description>Name associated with the MARC code</description>
+                       </field>
+               </fields>
+       </table>
+
        <table id="silly.fact" partition="true" fact-table="false">
                <label>Silly Fact table</label>
                <description>Base table for creating reports on silly words</description>