LP#1497335 Aged/All circulation API access
[Evergreen.git] / Open-ILS / examples / fm_IDL.xml
index 485e4c6..7126f16 100644 (file)
@@ -4209,7 +4209,7 @@ SELECT  usr,
                        </actions>
                </permacrud>
        </class>
-       <class id="combcirc" controller="open-ils.cstore" oils_obj:fieldmapper="action::all_circulation" oils_persist:tablename="action.all_circulation" reporter:core="true" reporter:label="Combined Aged and Active Circulations" oils_persist:readonly="true">
+       <class id="combcirc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::all_circulation" oils_persist:tablename="action.all_circulation" reporter:core="true" reporter:label="Combined Aged and Active Circulations" oils_persist:readonly="true">
                <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
                        <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
                        <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
@@ -4237,6 +4237,10 @@ SELECT  usr,
                        <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
                        <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
                        <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
+                       <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
+                       <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
+                       <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
+                       <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
                        <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
                        <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
                        <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
@@ -4254,6 +4258,8 @@ SELECT  usr,
                        <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
                        <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
                        <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
+                       <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
+                       <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
                </fields>
                <links>
                        <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
@@ -4275,12 +4281,22 @@ SELECT  usr,
                        <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
                        <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
                        <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
+                       <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
                        <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
                        <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
                        <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
                        <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
                        <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
+                       <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
+                       <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
+                       <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
                </links>
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+                       <actions>
+                               <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
+                       </actions>
+               </permacrud>
        </class>
        <class id="acirc" controller="open-ils.cstore" oils_obj:fieldmapper="action::aged_circulation" oils_persist:tablename="action.aged_circulation" reporter:core="true" reporter:label="Aged (patronless) Circulation">
                <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">