in-DB circ matrix models (a couple more to go)
[Evergreen.git] / Open-ILS / examples / fm_IDL.xml
index 333a031..ae2ff53 100644 (file)
                </links>
        </class>
 
+       <class id="ccm" controller="open-ils.cstore" oils_obj:fieldmapper="config::circ_modifier" oils_persist:tablename="config.circ_modifier" reporter:label="Circulation Modifier">
+               <fields oils_persist:primary="code">
+                       <field name="isnew" oils_obj:array_position="0" oils_persist:virtual="true" />
+                       <field name="ischanged" oils_obj:array_position="1" oils_persist:virtual="true" />
+                       <field name="isdeleted" oils_obj:array_position="2" oils_persist:virtual="true" />
+                       <field reporter:label="Code" name="code" oils_obj:array_position="3" oils_persist:virtual="false" reporter:selector="name" reporter:datatype="id"/>
+                       <field reporter:label="Name" name="name" oils_obj:array_position="4" oils_persist:virtual="false" reporter:datatype="text" oils_persist:i18n="true"/>
+                       <field reporter:label="Description" name="description" oils_obj:array_position="5" oils_persist:virtual="false" reporter:datatype="text" oils_persist:i18n="true"/>
+                       <field reporter:label="SIP2 Media Type" name="sip2_media_type" oils_obj:array_position="6" oils_persist:virtual="false" reporter:datatype="text" oils_persist:i18n="true"/>
+                       <field reporter:label="Magnetic Media" name="magnetic_media" oils_obj:array_position="7" oils_persist:virtual="false" reporter:datatype="bool"/>
+               </fields>
+               <links/>
+       </class>
+
+       <class id="cvrfm" controller="open-ils.cstore" oils_obj:fieldmapper="config::videorecording_format_map" oils_persist:tablename="config.videorecording_format_map" reporter:label="Videorecording Format">
+               <fields oils_persist:primary="code">
+                       <field name="isnew" oils_obj:array_position="0" oils_persist:virtual="true" />
+                       <field name="ischanged" oils_obj:array_position="1" oils_persist:virtual="true" />
+                       <field name="isdeleted" oils_obj:array_position="2" oils_persist:virtual="true" />
+                       <field reporter:label="Code" name="code" oils_obj:array_position="3" oils_persist:virtual="false" reporter:selector="name" reporter:datatype="id"/>
+                       <field reporter:label="Name" name="name" oils_obj:array_position="4" oils_persist:virtual="false" reporter:datatype="text" oils_persist:i18n="true"/>
+               </fields>
+               <links/>
+       </class>
+
+       <class id="ccmm" controller="open-ils.cstore" oils_obj:fieldmapper="config::circ_matrix_matchpoint" oils_persist:tablename="config.circ_matrix_matchpoint" reporter:label="Circulation Matrix Matchpoint">
+               <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
+                       <field name="isnew" oils_obj:array_position="0" oils_persist:virtual="true" />
+                       <field name="ischanged" oils_obj:array_position="1" oils_persist:virtual="true" />
+                       <field name="isdeleted" oils_obj:array_position="2" oils_persist:virtual="true" />
+                       <field reporter:label="Matchpoint ID" name="id" oils_obj:array_position="3" oils_persist:virtual="false" reporter:datatype="id"/>
+                       <field reporter:label="Active?" name="active" oils_obj:array_position="4" oils_persist:virtual="false" reporter:datatype="bool"/>
+                       <field reporter:label="Org Unit" name="org_unit" oils_obj:array_position="5" oils_persist:virtual="false" reporter:datatype="link"/>
+                       <field reporter:label="Permission Group" name="grp" oils_obj:array_position="6" oils_persist:virtual="false" reporter:datatype="link"/>
+                       <field reporter:label="Circulation Modifier" name="circ_modifier" oils_obj:array_position="7" oils_persist:virtual="false" oils_persist:primitive="string" reporter:datatype="link"/>
+                       <field reporter:label="MARC Type" name="marc_type" oils_obj:array_position="8" oils_persist:virtual="false" oils_persist:primitive="string" reporter:datatype="link"/>
+                       <field reporter:label="MARC Form" name="marc_form" oils_obj:array_position="9" oils_persist:virtual="false" oils_persist:primitive="string" reporter:datatype="link"/>
+                       <field reporter:label="Videorecording Format" name="marc_vr_format" oils_obj:array_position="10" oils_persist:virtual="false" oils_persist:primitive="string" reporter:datatype="link"/>
+                       <field reporter:label="Reference?" name="ref_flag" oils_obj:array_position="11" oils_persist:virtual="false" reporter:datatype="bool"/>
+                       <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" oils_obj:array_position="12" oils_persist:virtual="false" reporter:datatype="text"/>
+                       <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" oils_obj:array_position="13" oils_persist:virtual="false" reporter:datatype="text"/>
+               </fields>
+               <links>
+                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
+                       <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
+                       <link field="circ_modifier" reltype="has_a" key="id" map="" class="ccm"/>
+                       <link field="marc_type" reltype="has_a" key="id" map="" class="ccm"/>
+                       <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
+                       <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
+                       <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
+               </links>
+       </class>
+
+       <class id="ccmt" controller="open-ils.cstore" oils_obj:fieldmapper="config::circ_matrix_test" oils_persist:tablename="config.circ_matrix_test" reporter:label="Circulation Matrix Test Set">
+               <fields oils_persist:primary="matchpoint">
+                       <field name="isnew" oils_obj:array_position="0" oils_persist:virtual="true" />
+                       <field name="ischanged" oils_obj:array_position="1" oils_persist:virtual="true" />
+                       <field name="isdeleted" oils_obj:array_position="2" oils_persist:virtual="true" />
+                       <field reporter:label="Matchpoint ID" name="matchpoint" oils_obj:array_position="3" oils_persist:virtual="false" reporter:datatype="id"/>
+                       <field reporter:label="Circulate?" name="circulate" oils_obj:array_position="4" oils_persist:virtual="false" reporter:datatype="bool"/>
+                       <field reporter:label="Max Items Out" name="max_items_out" oils_obj:array_position="5" oils_persist:virtual="false" reporter:datatype="int"/>
+                       <field reporter:label="Max Overdue" name="max_overdue" oils_obj:array_position="6" oils_persist:virtual="false" reporter:datatype="int"/>
+                       <field reporter:label="Max Fines" name="max_fines" oils_obj:array_position="7" oils_persist:virtual="false" reporter:datatype="money"/>
+                       <field reporter:label="Test Script" name="script_test" oils_obj:array_position="8" oils_persist:virtual="false" reporter:datatype="text"/>
+               </fields>
+               <links>
+                       <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
+               </links>
+       </class>
+
+       <class id="ccmcmt" controller="open-ils.cstore" oils_obj:fieldmapper="config::circ_matrix_circ_mod_test" oils_persist:tablename="config.circ_matrix_circ_mod_test" reporter:label="Circulation Matrix Circulation Modifier Subtest">
+               <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_id_seq">
+                       <field name="isnew" oils_obj:array_position="0" oils_persist:virtual="true" />
+                       <field name="ischanged" oils_obj:array_position="1" oils_persist:virtual="true" />
+                       <field name="isdeleted" oils_obj:array_position="2" oils_persist:virtual="true" />
+                       <field reporter:label="Test ID" name="id" oils_obj:array_position="3" oils_persist:virtual="false" reporter:datatype="id"/>
+                       <field reporter:label="Matchpoint ID" name="matchpoint" oils_obj:array_position="4" oils_persist:virtual="false" reporter:datatype="link"/>
+                       <field reporter:label="Items Out" name="items_out" oils_obj:array_position="5" oils_persist:virtual="false" reporter:datatype="int"/>
+                       <field reporter:label="Circulation Modifier" name="circ_mod" oils_obj:array_position="6" oils_persist:virtual="false" reporter:datatype="link"/>
+               </fields>
+               <links>
+                       <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
+                       <link field="circ_mod" reltype="has_a" key="id" map="" class="ccm"/>
+               </links>
+       </class>
+
+       <class id="ccmrs" controller="open-ils.cstore" oils_obj:fieldmapper="config::circ_matrix_ruleset" oils_persist:tablename="config.circ_matrix_ruleset" reporter:label="Circulation Matrix Rule Set">
+               <fields oils_persist:primary="matchpoint">
+                       <field name="isnew" oils_obj:array_position="0" oils_persist:virtual="true" />
+                       <field name="ischanged" oils_obj:array_position="1" oils_persist:virtual="true" />
+                       <field name="isdeleted" oils_obj:array_position="2" oils_persist:virtual="true" />
+                       <field reporter:label="Matchpoint ID" name="matchpoint" oils_obj:array_position="3" oils_persist:virtual="false" reporter:datatype="id"/>
+                       <field reporter:label="Duration Rule" name="duration_rule" oils_obj:array_position="4" oils_persist:virtual="false" reporter:datatype="link"/>
+                       <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" oils_obj:array_position="4" oils_persist:virtual="false" reporter:datatype="link"/>
+                       <field reporter:label="Max Fine Rule" name="max_fine_rule" oils_obj:array_position="4" oils_persist:virtual="false" reporter:datatype="link"/>
+               </fields>
+               <links>
+                       <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
+                       <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
+                       <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
+                       <link field="recuring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
+               </links>
+       </class>
+
        <class id="cit" controller="open-ils.cstore" oils_obj:fieldmapper="config::identification_type" oils_persist:tablename="config.identification_type" reporter:label="Identification Type">
                <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
                        <field name="isnew" oils_obj:array_position="0" oils_persist:virtual="true" />
                </fields>
                <links/>
        </class>
+
        <class id="asvq" controller="open-ils.cstore" oils_obj:fieldmapper="action::survey_question" oils_persist:tablename="action.survey_question" reporter:label="User Survey Question">
                <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
                        <field name="isnew" oils_obj:array_position="0" oils_persist:virtual="true" />