]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
add a table to manage vandelay merge profiles
[working/Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 -->
23
24 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
25
26         <!-- Virtual classes -->
27         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
28                 <fields>
29                         <field name="usr" oils_persist:virtual="true" />
30                         <field name="forgive_payment" oils_persist:virtual="true" />
31                         <field name="work_payment" oils_persist:virtual="true" />
32                         <field name="credit_payment" oils_persist:virtual="true" />
33                         <field name="goods_payment" oils_persist:virtual="true" />
34                 </fields>
35                 <links>
36                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
37                 </links>
38         </class>
39
40         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
41                 <fields>
42                         <field name="workstation" oils_persist:virtual="true" />
43                         <field name="cash_payment" oils_persist:virtual="true" />
44                         <field name="check_payment" oils_persist:virtual="true" />
45                         <field name="credit_card_payment" oils_persist:virtual="true" />
46                 </fields>
47                 <links>
48                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
49                 </links>
50         </class>
51
52         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
53                 <fields>
54                         <field name="id" oils_persist:virtual="true" />
55                         <field name="children" oils_persist:virtual="true" />
56                         <field name="owner_doc" oils_persist:virtual="true" />
57                         <field name="intra_doc_id" oils_persist:virtual="true" />
58                         <field name="parent_node" oils_persist:virtual="true" />
59                         <field name="node_type" oils_persist:virtual="true" />
60                         <field name="namespace_uri" oils_persist:virtual="true" />
61                         <field name="name" oils_persist:virtual="true" />
62                         <field name="value" oils_persist:virtual="true" />
63                 </fields>
64         </class>
65
66         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
67                 <fields>
68                         <field name="title" oils_persist:virtual="true" />
69                         <field name="author" oils_persist:virtual="true" />
70                         <field name="doc_id" oils_persist:virtual="true" />
71                         <field name="doc_type" oils_persist:virtual="true" />
72                         <field name="pubdate" oils_persist:virtual="true" />
73                         <field name="isbn" oils_persist:virtual="true" />
74                         <field name="publisher" oils_persist:virtual="true" />
75                         <field name="tcn" oils_persist:virtual="true" />
76                         <field name="subject" oils_persist:virtual="true" />
77                         <field name="types_of_resource" oils_persist:virtual="true" />
78                         <field name="call_numbers" oils_persist:virtual="true" />
79                         <field name="edition" oils_persist:virtual="true" />
80                         <field name="online_loc" oils_persist:virtual="true" />
81                         <field name="synopsis" oils_persist:virtual="true" />
82                         <field name="physical_description" oils_persist:virtual="true" />
83                         <field name="toc" oils_persist:virtual="true" />
84                         <field name="copy_count" oils_persist:virtual="true" />
85                         <field name="series" oils_persist:virtual="true" />
86                         <field name="serials" oils_persist:virtual="true" />
87                 </fields>
88         </class>
89
90         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
91                 <fields>
92                         <field name="err_msg" oils_persist:virtual="true" />
93                         <field name="type" oils_persist:virtual="true" />
94                 </fields>
95         </class>
96
97         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
98                 <fields>
99                         <field name="err_msg" oils_persist:virtual="true" />
100                         <field name="type" oils_persist:virtual="true" />
101                 </fields>
102         </class>
103
104         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
105                 <fields oils_persist:primary="matchpoint">
106                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
107                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
108                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
109                 </fields>
110                 <links>
111                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
112                 </links>
113         </class>
114
115         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
116         <!-- when the time is right, turn me into a view.  -->
117                 <fields>
118             <field reporter:label="Total Circs" name="num_circs" datatype="int"/>
119             <field reporter:label="Start Time" name="start_time" datatype="timestamp"/>
120             <field reporter:label="Checkout Workstation" name="checkout_workstation" datatype="text"/>
121             <field reporter:label="Last Renewal Time" name="last_renewal_time" datatype="timestamp"/>
122             <field reporter:label="Last Stop Fines" name="last_stop_fines" datatype="text"/>
123             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" datatype="timestamp"/>
124             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" datatype="text"/>
125             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" datatype="text"/>
126             <field reporter:label="Last Checkin Time" name="last_checkin_time" datatype="timestamp"/>
127             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" datatype="timestamp"/>
128                 </fields>
129         </class>
130
131
132         <!-- Actually in the DB -->
133         <class id="vmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::merge_profile" oils_persist:tablename="vandelay.merge_profile" reporter:label="Bib Import Merge Profile">
134                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
135                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
136                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
137                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
138                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
139                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
140                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
141                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
142                 </fields>
143                 <links>
144                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
145                 </links>
146                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
147                         <actions>
148                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
149                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
150                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
151                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
152                         </actions>
153                 </permacrud>
154         </class>
155
156         <class id="vibtf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_bib_trash_fields" oils_persist:tablename="vandelay.import_bib_trash_fields" reporter:label="Import/Overlay Fields for Removal">
157                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
158                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
159                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
160                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
161                 </fields>
162                 <links>
163                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
164                 </links>
165                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
166                         <actions>
167                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
168                                 <retrieve permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
169                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
170                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
171                         </actions>
172                 </permacrud>
173         </class>
174
175         <class id="vii" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item" oils_persist:tablename="vandelay.import_item" reporter:label="Import Item">
176                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
177                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
178                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
179                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
180                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
181                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
182                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
183                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
184                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
185                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
186                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
187                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
188                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
189                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
190                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
191                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
192                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
193                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
194                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
195                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
196                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
197                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
198                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
199                 </fields>
200                 <links>
201                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
202                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
203                 </links>
204                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
205                         <actions>
206                                 <create permission="CREATE_IMPORT_ITEM">
207                     <context link="definition" field="owner"/>
208                                 </create>
209                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
210                     <context link="definition" field="owner"/>
211                                 </retrieve>
212                                 <update permission="UPDATE_IMPORT_ITEM">
213                     <context link="definition" field="owner"/>
214                                 </update>
215                                 <delete permission="DELETE_IMPORT_ITEM">
216                     <context link="definition" field="owner"/>
217                                 </delete>
218                         </actions>
219                 </permacrud>
220         </class>
221
222         <class id="viiad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item_attr_definition" oils_persist:tablename="vandelay.import_item_attr_definition" reporter:label="Import Item Attribute Definition">
223                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
224                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
225                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
226                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
227                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
228                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
229                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
230                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
231                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
232                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
233                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
234                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
235                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
236                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
237                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
238                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
239                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
240                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
241                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
242                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
243                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
244                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
245                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
246                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
247                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
248                 </fields>
249                 <links>
250                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
251                 </links>
252                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
253                         <actions>
254                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
255                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
256                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
257                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
258                         </actions>
259                 </permacrud>
260         </class>
261
262         <class id="vbq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_queue" oils_persist:tablename="vandelay.bib_queue" reporter:label="Import/Overlay Bib Queue">
263                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
264                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
265                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
266                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
267                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
268                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
269                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
270                 </fields>
271                 <links>
272                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
273                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
274                 </links>
275                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
276                         <actions>
277                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
278                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
279                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
280                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
281                         </actions>
282                 </permacrud>
283         </class>
284
285         <class id="vqbr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record" oils_persist:tablename="vandelay.queued_bib_record" reporter:label="Queued Bib Record">
286                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
287                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
288                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
289                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
290                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
291                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
292                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
293                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
294                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
295                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
296                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
297                 </fields>
298                 <links>
299                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
300                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
301                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
302             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
303             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
304                 </links>
305                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
306                         <actions>
307                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
308                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
309                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
310                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
311                         </actions>
312                 </permacrud>
313         </class>
314
315         <class id="vqbrad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_attr_definition" oils_persist:tablename="vandelay.bib_attr_definition" reporter:label="Queued Bib Record Attribute Definition">
316                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
317                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
318                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
319                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
320                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
321                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
322                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
323                 </fields>
324                 <links/>
325                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
326                         <actions>
327                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
328                 <retrieve/>
329                 <!--
330                                 <retrieve permission="CREATE_BIB_IMPORT_IMPORT_FIELD_DEF UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
331                 -->
332                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
333                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
334                         </actions>
335                 </permacrud>
336         </class>
337
338         <class id="vqbra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record_attr" oils_persist:tablename="vandelay.queued_bib_record_attr" reporter:label="Queued Bib Record Attribute">
339                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
340                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
341                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
342                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
343                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
344                 </fields>
345                 <links>
346                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
347                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
348                 </links>
349                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
350                         <actions>
351                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
352                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
353                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
354                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
355                         </actions>
356                 </permacrud>
357         </class>
358
359         <class id="vbm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_match" oils_persist:tablename="vandelay.bib_match" reporter:label="Queued Bib Record Match">
360                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
361                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
362                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
363                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
364                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
365                         <field reporter:label="Field Type" name="field_type" reporter:datatype="text"/>
366                 </fields>
367                 <links>
368                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
369                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
370                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
371                 </links>
372                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
373                         <actions>
374                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
375                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
376                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
377                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
378                         </actions>
379                 </permacrud>
380         </class>
381
382         <class id="vaq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_queue" oils_persist:tablename="vandelay.authority_queue" reporter:label="Import/Overlay Authority Queue">
383                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
384                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
385                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
386                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
387                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
388                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
389                 </fields>
390                 <links>
391                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
392                 </links>
393                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
394                         <actions>
395                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
396                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
397                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
398                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
399                         </actions>
400                 </permacrud>
401         </class>
402
403         <class id="vqar" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record" oils_persist:tablename="vandelay.queued_authority_record" reporter:label="Queued Authority Record">
404                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
405                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
406                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
407                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
408                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
409                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
410                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
411                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
412                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
413                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
414                 </fields>
415                 <links>
416                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
417                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
418             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
419             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
420                 </links>
421                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
422                         <actions>
423                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
424                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
425                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
426                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
427                         </actions>
428                 </permacrud>
429         </class>
430
431         <class id="vqarad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_attr_definition" oils_persist:tablename="vandelay.authority_attr_definition" reporter:label="Queued Authority Record Attribute Definition">
432                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
433                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
434                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
435                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
436                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
437                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
438                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
439                 </fields>
440                 <links/>
441                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
442                         <actions>
443                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
444                 <retrieve/>
445                 <!--
446                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
447                 -->
448                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
449                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
450                         </actions>
451                 </permacrud>
452         </class>
453
454         <class id="vqara" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record_attr" oils_persist:tablename="vandelay.queued_authority_record_attr" reporter:label="Queued Authority Record Attribute">
455                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
456                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
457                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
458                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
459                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
460                 </fields>
461                 <links>
462                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
463                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
464                 </links>
465                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
466                         <actions>
467                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
468                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
469                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
470                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
471                         </actions>
472                 </permacrud>
473         </class>
474
475         <class id="vam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_match" oils_persist:tablename="vandelay.authority_match" reporter:label="Queued Authority Record Match">
476                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
477                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
478                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
479                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
480                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
481                 </fields>
482                 <links>
483                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
484                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
485                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
486                 </links>
487                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
488                         <actions>
489                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
490                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
491                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
492                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
493                         </actions>
494                 </permacrud>
495         </class>
496
497
498         <class id="auoi" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_org_unit_opt_in" oils_persist:tablename="actor.usr_org_unit_opt_in" reporter:label="User Sharing Opt-in">
499                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
500                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
501                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
502                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
503                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
504                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
505                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
506                 </fields>
507                 <links>
508                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
509                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
510                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
511                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
512                 </links>
513         </class>
514
515     <class id="cin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::index_normalizer" oils_persist:tablename="config.index_normalizer" reporter:label="Indexing Normalizer" oils_persist:field_safe="true">
516         <fields oils_persist:primary="id">
517             <field reporter:label="ID" name="id" reporter:datatype="id"/>
518             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
519             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
520             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
521             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
522         </fields>
523         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
524             <actions>
525                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
526                 <retrieve/>
527                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
528                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
529             </actions>
530         </permacrud>
531     </class>
532
533         <class id="cmfinm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_index_norm_map" oils_persist:tablename="config.metabib_field_index_norm_map" reporter:label="Metabib Field to Indexing Normalizer Map" oils_persist:field_safe="true">
534                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
535                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
536                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
537                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
538                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
539                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
540                 </fields>
541                 <links>
542                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
543                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
544                 </links>
545         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
546             <actions>
547                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
548                 <retrieve/>
549                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
550                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
551             </actions>
552         </permacrud>
553         </class>
554
555         <class id="cracct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::remote_account" oils_persist:tablename="config.remote_account" reporter:label="Remote (3rd party) Account">
556                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
557                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
558                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
559                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
560                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
561                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
562                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
563                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
564                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
565                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
566                 </fields>
567                 <links>
568                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
569                 </links>
570         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
571             <actions>
572                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
573                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
574                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
575                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
576             </actions>
577         </permacrud>
578         </class>
579
580     <class id="czs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_source" oils_persist:tablename="config.z3950_source" reporter:label="Z39.50 Source">
581         <fields oils_persist:primary="name">
582             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
583             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
584             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
585             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
586             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
587             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
588             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
589             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
590             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
591         </fields>
592         <links>
593             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
594         </links>
595         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
596             <actions>
597                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
598                 <retrieve/>
599                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
600                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
601             </actions>
602         </permacrud>
603     </class>
604
605     <class id="cza" controller="open-ils.cstore" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
606         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
607             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
608             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
609             <field reporter:label="Name" name="name" reporter:datatype="text"/>
610             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
611             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
612             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
613             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
614         </fields>
615         <links>
616             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
617         </links>
618     </class>
619
620         <class id="ateo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_output" oils_persist:tablename="action_trigger.event_output" reporter:label="Event Output">
621                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
622                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
623                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
624                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
625                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
626                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
627                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
628                 </fields>
629                 <links>
630             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
631             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
632                 </links>
633                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
634                         <actions>
635                                 <retrieve/>
636                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
637                         </actions>
638                 </permacrud>
639         </class>
640
641         <class id="ath" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::hook" oils_persist:tablename="action_trigger.hook" reporter:label="Trigger Hook Point">
642                 <fields oils_persist:primary="key">
643                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
644                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
645                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
646                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
647                 </fields>
648                 <links/>
649                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
650                         <actions>
651                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
652                                 <retrieve/>
653                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
654                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
655                         </actions>
656                 </permacrud>
657         </class>
658
659         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
660                 <fields oils_persist:primary="module">
661                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
662                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
663                 </fields>
664                 <links/>
665         </class>
666
667         <class id="atval" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::validator" oils_persist:tablename="action_trigger.validator" reporter:label="Trigger Condition Validator">
668                 <fields oils_persist:primary="module">
669                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
670                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
671                 </fields>
672                 <links/>
673                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
674                         <actions>
675                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
676                                 <retrieve/>
677                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
678                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
679                         </actions>
680                 </permacrud>
681         </class>
682
683         <class id="atreact" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::reactor" oils_persist:tablename="action_trigger.reactor" reporter:label="Trigger Event Reactor">
684                 <fields oils_persist:primary="module">
685                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
686                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
687                 </fields>
688                 <links/>
689                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
690                         <actions>
691                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
692                                 <retrieve/>
693                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
694                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
695                         </actions>
696                 </permacrud>
697         </class>
698
699         <class id="atclean" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::cleanup" oils_persist:tablename="action_trigger.cleanup" reporter:label="Trigger Event Cleanup">
700                 <fields oils_persist:primary="module">
701                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
702                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
703                 </fields>
704                 <links/>
705                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
706                         <actions>
707                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
708                                 <retrieve/>
709                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
710                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
711                         </actions>
712                 </permacrud>
713         </class>
714
715         <class id="atenv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::environment" oils_persist:tablename="action_trigger.environment" reporter:label="Trigger Event Environment Entry">
716                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
717                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
718                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
719                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
720                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
721                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
722                 </fields>
723                 <links>
724                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
725                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
726                 </links>
727                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
728                         <actions>
729                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
730                     <context link="event_def" field="owner"/>
731                 </create>
732                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
733                     <context link="event_def" field="owner"/>
734                 </retrieve>
735                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
736                     <context link="event_def" field="owner"/>
737                 </update>
738                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
739                     <context link="event_def" field="owner"/>
740                 </delete>
741                         </actions>
742                 </permacrud>
743         </class>
744
745         <class id="atevdef" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_definition" oils_persist:tablename="action_trigger.event_definition" reporter:label="Trigger Event Definition">
746                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
747                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
748                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
749                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
750                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
751                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
752                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
753                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
754                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
755                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
756                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
757                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
758                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
759                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
760                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
761                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
762                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
763                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
764                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
765                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
766                 </fields>
767                 <links>
768                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
769                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
770                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
771                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
772                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
773                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
774                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
775                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
776                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
777                 </links>
778                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
779                         <actions>
780                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
781                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
782                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
783                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
784                         </actions>
785                 </permacrud>
786         </class>
787
788         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
789                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
790                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
791                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
792                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
793                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
794                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
795                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
796                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
797                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
798                         <field reporter:label="State" name="state" reporter:datatype="text"/>
799                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
800                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
801                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
802                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
803                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
804                 </fields>
805                 <links>
806                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
807                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
808                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
809                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
810                 </links>
811         </class>
812
813         <class id="atevparam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_param" oils_persist:tablename="action_trigger.event_params" reporter:label="Trigger Event Parameter">
814                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
815                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
816                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
817                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
818                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
819                 </fields>
820                 <links>
821                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
822                 </links>
823                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
824                         <actions>
825                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
826                     <context link="event_def" field="owner"/>
827                 </create>
828                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
829                     <context link="event_def" field="owner"/>
830                 </retrieve>
831                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
832                     <context link="event_def" field="owner"/>
833                 </update>
834                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
835                     <context link="event_def" field="owner"/>
836                 </delete>
837                         </actions>
838                 </permacrud>
839         </class>
840
841         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
842                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
843                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
844                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
845                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
846                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
847                 </fields>
848                 <links>
849                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
850                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
851                 </links>
852         </class>
853
854         <class id="ccm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_modifier" oils_persist:tablename="config.circ_modifier" reporter:label="Circulation Modifier">
855                 <fields oils_persist:primary="code">
856                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
857                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
858                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
859                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
860                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
861                 </fields>
862                 <links/>
863         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
864             <actions>
865                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
866                 <retrieve/>
867                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
868                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
869             </actions>
870         </permacrud>
871         </class>
872
873         <class id="aiit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_item_type" oils_persist:tablename="acq.invoice_item_type" reporter:label="Non-bibliographic Invoice Item Type" oils_persist:field_safe="true">
874                 <fields oils_persist:primary="code">
875                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
876                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
877                 </fields>
878                 <links/>
879         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
880             <actions>
881                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
882                 <retrieve/>
883                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
884                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
885             </actions>
886         </permacrud>
887         </class>
888
889         <class id="acqim" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_method" oils_persist:tablename="acq.invoice_method" reporter:label="Invoice Method used by Vendor" oils_persist:field_safe="true">
890                 <fields oils_persist:primary="code">
891                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
892                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
893                 </fields>
894                 <links/>
895         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
896             <actions>
897                 <create permission="CREATE_INVOICE_METHOD" global_required="true"/>
898                 <retrieve/>
899                 <update permission="UPDATE_INVOICE_METHOD" global_required="true"/>
900                 <delete permission="DELETE_INVOICE_METHOD" global_required="true"/>
901             </actions>
902         </permacrud>
903         </class>
904
905         <class id="ccpbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_type" oils_persist:tablename="container.copy_bucket_type" reporter:label="Copy Bucket Type" oils_persist:field_safe="true">
906                 <fields oils_persist:primary="code">
907                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
908                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
909                 </fields>
910                 <links/>
911         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
912             <actions>
913                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
914                 <retrieve permission="CREATE_COPY_BTYPE UPDATE_COPY_BTYPE DELETE_COPY_BTYPE" global_required="true"/>
915                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
916                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
917             </actions>
918         </permacrud>
919         </class>
920
921         <class id="ccnbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::call_number_bucket_type" oils_persist:tablename="container.call_number_bucket_type" reporter:label="Call Number Bucket Type" oils_persist:field_safe="true">
922                 <fields oils_persist:primary="code">
923                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
924                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
925                 </fields>
926                 <links/>
927         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
928             <actions>
929                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
930                 <retrieve permission="CREATE_CN_BTYPE UPDATE_CN_BTYPE DELETE_CN_BTYPE" global_required="true"/>
931                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
932                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
933             </actions>
934         </permacrud>
935         </class>
936
937         <class id="cbrebt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::biblio_record_entry_bucket_type" oils_persist:tablename="container.biblio_record_entry_bucket_type" reporter:label="Bibliographic Record Bucket Type" oils_persist:field_safe="true">
938                 <fields oils_persist:primary="code">
939                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
940                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
941                 </fields>
942                 <links/>
943         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
944             <actions>
945                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
946                 <retrieve permission="CREATE_BIB_BTYPE UPDATE_BIB_BTYPE DELETE_BIB_BTYPE" global_required="true"/>
947                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
948                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
949             </actions>
950         </permacrud>
951         </class>
952
953         <class id="cubt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::user_bucket_type" oils_persist:tablename="container.user_bucket_type" reporter:label="User Bucket Type" oils_persist:field_safe="true">
954                 <fields oils_persist:primary="code">
955                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
956                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
957                 </fields>
958                 <links/>
959         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
960             <actions>
961                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
962                 <retrieve permission="CREATE_USER_BTYPE UPDATE_USER_BTYPE DELETE_USER_BTYPE" global_required="true"/>
963                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
964                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
965             </actions>
966         </permacrud>
967         </class>
968
969         <class id="cvrfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::videorecording_format_map" oils_persist:tablename="config.videorecording_format_map" reporter:label="Videorecording Format" oils_persist:field_safe="true">
970                 <fields oils_persist:primary="code">
971                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
972                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
973                 </fields>
974                 <links/>
975         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
976             <actions>
977                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
978                 <retrieve/>
979                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
980                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
981             </actions>
982         </permacrud>
983         </class>
984
985         <class id="chmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_matchpoint" oils_persist:tablename="config.hold_matrix_matchpoint" reporter:label="Hold Matrix Matchpoint">
986                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
987                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
988                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
989                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
990                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
991                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
992                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
993                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
994                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
995                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
996                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
997                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
998                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
999                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1000                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1001                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1002                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1003                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1004                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1005                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1006                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1007                 </fields>
1008                 <links>
1009                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1010                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1011                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1012                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1013                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1014                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1015                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1016                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1017                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1018                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1019                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1020                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1021             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1022                 </links>
1023         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1024             <actions>
1025                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1026                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1027                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1028                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1029             </actions>
1030         </permacrud>
1031         </class>
1032
1033         <class id="ccmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_matchpoint" oils_persist:tablename="config.circ_matrix_matchpoint" reporter:label="Circulation Matrix Matchpoint">
1034                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1035                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1036                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1037                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1038                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1039                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link"/>
1040                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1041                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1042                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1043                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1044                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1045                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1046                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1047                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1048                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1049                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1050                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1051                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1052                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1053                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1054                 </fields>
1055                 <links>
1056                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1057                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1058                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1059                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1060                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1061                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1062                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1063                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1064                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1065                 </links>
1066         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1067             <actions>
1068                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1069                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1070                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1071                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1072             </actions>
1073         </permacrud>
1074         </class>
1075
1076         <class id="ccmcmt" controller="open-ils.cstore open-ils.pcrud" 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">
1077                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_id_seq">
1078                         <field reporter:label="Test ID" name="id" reporter:datatype="id"/>
1079                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="link"/>
1080                         <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1081                 </fields>
1082                 <links>
1083                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1084                 </links>
1085         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1086             <actions>
1087                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1088                     <context link="matchpoint" field="org_unit"/>
1089                 </create>
1090                 <retrieve/>
1091                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1092                     <context link="matchpoint" field="org_unit"/>
1093                 </update>
1094                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1095                     <context link="matchpoint" field="org_unit"/>
1096                 </delete>
1097             </actions>
1098         </permacrud>
1099         </class>
1100
1101         <class id="ccmcmtm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_circ_mod_test_map" oils_persist:tablename="config.circ_matrix_circ_mod_test_map" reporter:label="Circulation Matrix Circulation Modifier Subtest Circulation Modifier Set">
1102                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_map_id_seq">
1103                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
1104                         <field reporter:label="Circulation Modifier Subtest ID" name="circ_mod_test" reporter:datatype="link"/>
1105                         <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1106                 </fields>
1107                 <links>
1108                         <link field="circ_mod_test" reltype="has_a" key="id" map="" class="ccmcmt"/>
1109                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1110                 </links>
1111         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1112             <actions>
1113                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1114                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1115                 </create>
1116                 <retrieve/>
1117                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1118                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1119                 </update>
1120                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1121                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1122                 </delete>
1123             </actions>
1124         </permacrud>
1125         </class>
1126
1127         <class id="cit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::identification_type" oils_persist:tablename="config.identification_type" reporter:label="Identification Type">
1128                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1129                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1130                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1131                 </fields>
1132                 <links/>
1133         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1134             <actions>
1135                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1136                 <retrieve/>
1137                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1138                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1139             </actions>
1140         </permacrud>
1141         </class>
1142
1143         <class id="asvq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_question" oils_persist:tablename="action.survey_question" reporter:label="User Survey Question">
1144                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1145                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1146                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1147                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1148                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1149                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1150                 </fields>
1151                 <links>
1152                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1153                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1154                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1155                 </links>
1156         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1157             <actions>
1158                 <create permission="ADMIN_SURVEY">
1159                     <context link="survey" field="owner"/>
1160                 </create>
1161                 <retrieve/>
1162                 <update permission="ADMIN_SURVEY">
1163                     <context link="survey" field="owner"/>
1164                 </update>
1165                 <delete permission="ADMIN_SURVEY">
1166                     <context link="survey" field="owner"/>
1167                 </delete>
1168             </actions>
1169         </permacrud>
1170         </class>
1171         <class id="mbts" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction_summary" oils_persist:tablename="money.materialized_billable_xact_summary" reporter:label="Billable Transaction Summary" oils_persist:readonly="true">
1172                 <fields oils_persist:primary="id" oils_persist:sequence="">
1173                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1174                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1175                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1176                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1177                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1178                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1179                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1180                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1181                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1182                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1183                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1184                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1185                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1186                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1187                 </fields>
1188                 <links>
1189                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1190                 </links>
1191         </class>
1192         <class id="mbtslv" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction_summary_location_view" oils_persist:tablename="money.billable_xact_summary_location_view" reporter:label="Billable Transaction Summary with Billing Location" oils_persist:readonly="true" reporter:core="true">
1193                 <fields oils_persist:primary="id" oils_persist:sequence="">
1194                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1195                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1196                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1197                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1198                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1199                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1200                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1201                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1202                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1203                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1204                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1205                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1206                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1207                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1208                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1209                 </fields>
1210                 <links>
1211                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1212                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1213                 </links>
1214         </class>
1215         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1216                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1217                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1218                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1219                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1220                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1221                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1222                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1223                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1224                 </fields>
1225                 <links>
1226                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1227                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1228                 </links>
1229         </class>
1230         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1231                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1232                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1233                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1234                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1235                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1236                 </fields>
1237                 <links>
1238                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1239                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1240                 </links>
1241         </class>
1242         <class id="mafe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::author_field_entry" oils_persist:tablename="metabib.author_field_entry" reporter:label="Author Field Entry">
1243                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1244                         <field name="field" reporter:datatype="link"/>
1245                         <field name="id" reporter:datatype="id" />
1246                         <field name="source" reporter:datatype="link"/>
1247                         <field name="value" reporter:datatype="text"/>
1248                 </fields>
1249                 <links>
1250                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1251                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1252                 </links>
1253         </class>
1254         <class id="aihu" controller="open-ils.cstore" oils_obj:fieldmapper="action::in_house_use" oils_persist:tablename="action.in_house_use" reporter:core="true" reporter:label="In House Use">
1255                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1256                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1257                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1258                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1259                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1260                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1261                 </fields>
1262                 <links>
1263                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1264                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1265                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1266                 </links>
1267         </class>
1268         <class id="ancihu" controller="open-ils.cstore" oils_obj:fieldmapper="action::non_cat_in_house_use" oils_persist:tablename="action.non_cat_in_house_use" reporter:core="true" reporter:label="Non-cataloged In House Use">
1269                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1270                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1271                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1272                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1273                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1274                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1275                 </fields>
1276                 <links>
1277                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1278                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1279                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1280                 </links>
1281         </class>
1282         <class id="atc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::transit_copy" oils_persist:tablename="action.transit_copy" reporter:core="true" reporter:label="Copy Transit">
1283                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1284                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1285                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1286                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1287                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1288                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1289                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1290                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1291                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1292                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1293                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1294                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1295                 </fields>
1296                 <links>
1297                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1298                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1299                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1300                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1301                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1302                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1303                 </links>
1304         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1305             <actions>
1306                 <create permission="TRANSIT_COPY" context_field="owner">
1307                     <context link="target_copy" field="circ_lib"/>
1308                 </create>
1309                 <retrieve/>
1310                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1311                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1312             </actions>
1313         </permacrud>
1314         </class>
1315         <class id="asvr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_response" oils_persist:tablename="action.survey_response" reporter:label="Survey Response">
1316                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1317                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1318                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1319                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1320                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1321                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1322                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1323                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1324                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1325                 </fields>
1326                 <links>
1327                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1328                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1329                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1330                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1331                 </links>
1332         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1333             <actions>
1334                 <create permission="ADMIN_SURVEY">
1335                     <context link="survey" field="owner"/>
1336                 </create>
1337                 <retrieve/>
1338                 <update permission="ADMIN_SURVEY">
1339                     <context link="survey" field="owner"/>
1340                 </update>
1341                 <delete permission="ADMIN_SURVEY">
1342                     <context link="survey" field="owner"/>
1343                 </delete>
1344             </actions>
1345         </permacrud>
1346         </class>
1347         <class id="ccbi" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_item" oils_persist:tablename="container.copy_bucket_item" reporter:label="Copy Bucket Item">
1348                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
1349                         <field name="bucket" />
1350                         <field name="id" reporter:datatype="id" />
1351                         <field name="target_copy" reporter:datatype="link"/>
1352                         <field name="create_time" reporter:datatype="timestamp" />
1353                         <field name="pos" reporter:datatype="int" />
1354                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
1355                 </fields>
1356                 <links>
1357                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1358                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
1359             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
1360                 </links>
1361         </class>
1362         <class id="ccbin" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_item_note" oils_persist:tablename="container.copy_bucket_item_note" reporter:label="Copy Bucket Item Note">
1363                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
1364                         <field name="id" reporter:datatype="id" />
1365                         <field name="item" reporter:datatype="link"/>
1366                         <field name="note" reporter:datatype="text" />
1367                 </fields>
1368                 <links>
1369                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
1370                 </links>
1371         </class>
1372         <class id="are" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_entry" oils_persist:tablename="authority.record_entry" reporter:label="Authority Record Entry">
1373                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
1374                         <field name="active" reporter:datatype="bool"/>
1375                         <field name="arn_source" />
1376                         <field name="arn_value" />
1377                         <field name="create_date" reporter:datatype="timestamp"/>
1378                         <field name="creator" />
1379                         <field name="deleted" reporter:datatype="bool"/>
1380                         <field name="edit_date" reporter:datatype="timestamp"/>
1381                         <field name="editor" />
1382                         <field name="id" reporter:datatype="id" />
1383                         <field name="last_xact_id" />
1384                         <field name="marc" />
1385                         <field name="source" />
1386                         <field name="fixed_fields" oils_persist:virtual="true" />
1387                         <field name="notes" oils_persist:virtual="true" />
1388                 </fields>
1389                 <links>
1390                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1391                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1392                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
1393                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
1394                 </links>
1395         </class>
1396         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
1397                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
1398                         <field name="char_encoding" />
1399                         <field name="id" />
1400                         <field name="record" />
1401                         <field name="record_status" />
1402                 </fields>
1403                 <links>
1404                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
1405                 </links>
1406         </class>
1407         <class id="clm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::language_map" oils_persist:tablename="config.language_map" reporter:label="Language Map" oils_persist:field_safe="true">
1408                 <fields oils_persist:primary="code" oils_persist:sequence="">
1409                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1410                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1411                 </fields>
1412                 <links/>
1413         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1414             <actions>
1415                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1416                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
1417                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1418                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1419             </actions>
1420         </permacrud>
1421         </class>
1422         <class id="mccp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_card_payment" oils_persist:tablename="money.credit_card_payment" reporter:label="Credit Card Payment">
1423                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
1424                         <field name="accepting_usr" />
1425                         <field name="amount" reporter:datatype="money" />
1426                         <field name="amount_collected" reporter:datatype="money" />
1427                         <field name="approval_code" reporter:datatype="text"/>
1428                         <field name="cash_drawer" reporter:datatype="link"/>
1429                         <field name="cc_number" reporter:datatype="text"/>
1430                         <field name="cc_type" reporter:datatype="text"/>
1431                         <field name="cc_processor" reporter:datatype="text"/>
1432                         <field name="expire_month" reporter:datatype="int" />
1433                         <field name="expire_year" reporter:datatype="int" />
1434                         <field name="id" reporter:datatype="id" />
1435                         <field name="note" reporter:datatype="text"/>
1436                         <field name="payment_ts" reporter:datatype="timestamp"/>
1437                         <field name="xact" reporter:datatype="link"/>
1438                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
1439                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
1440                 </fields>
1441                 <links>
1442                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
1443                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
1444                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
1445                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
1446                 </links>
1447         </class>
1448         <class id="cxt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::xml_transform" oils_persist:tablename="config.xml_transform" reporter:label="XML/XSLT Transform Definition">
1449                 <fields oils_persist:primary="name">
1450                         <field reporter:label="Field Class" name="field_class" />
1451                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1452                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
1453                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
1454                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
1455                 </fields>
1456                 <links/>
1457         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1458             <actions>
1459                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
1460                 <retrieve/>
1461                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
1462                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
1463             </actions>
1464         </permacrud>
1465         </class>
1466         <class id="cmf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field" oils_persist:tablename="config.metabib_field" reporter:label="Metabib Field">
1467                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
1468                         <field name="field_class" />
1469                         <field name="id" reporter:datatype="id" />
1470                         <field name="name" reporter:datatype="text"/>
1471                         <field name="xpath" reporter:datatype="text"/>
1472                         <field name="weight" reporter:datatype="int" />
1473                         <field name="format" reporter:datatype="link"/>
1474                         <field name="search_field" reporter:datatype="bool" />
1475                         <field name="facet_field" reporter:datatype="bool" />
1476                 </fields>
1477                 <links/>
1478         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1479             <actions>
1480                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
1481                 <retrieve/>
1482                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
1483                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
1484             </actions>
1485         </permacrud>
1486         </class>
1487         <class id="cbfp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::biblio_fingerprint" oils_persist:tablename="config.biblio_fingerprint" reporter:label="Fingerprint Definition">
1488                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
1489                         <field name="id" reporter:datatype="id" />
1490                         <field name="name" reporter:datatype="text"/>
1491                         <field name="xpath" reporter:datatype="text"/>
1492                         <field name="format" reporter:datatype="link"/>
1493                         <field name="first_word" reporter:datatype="bool" />
1494                 </fields>
1495                 <links/>
1496         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1497             <actions>
1498                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
1499                 <retrieve/>
1500                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
1501                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
1502             </actions>
1503         </permacrud>
1504         </class>
1505         <class id="cam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::audience_map" oils_persist:tablename="config.audience_map" reporter:label="Audience Map" oils_persist:field_safe="true">
1506                 <fields oils_persist:primary="code" oils_persist:sequence="">
1507                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1508                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1509                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1510                 </fields>
1511                 <links/>
1512         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1513             <actions>
1514                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1515                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
1516                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1517                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1518             </actions>
1519         </permacrud>
1520         </class>
1521         <class id="cifm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::item_form_map" oils_persist:tablename="config.item_form_map" reporter:label="Item Form Map" oils_persist:field_safe="true">
1522                 <fields oils_persist:primary="code" oils_persist:sequence="">
1523                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1524                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1525                 </fields>
1526                 <links/>
1527         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1528             <actions>
1529                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1530                 <retrieve/>
1531                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1532                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1533             </actions>
1534         </permacrud>
1535         </class>
1536         <class id="acn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number" oils_persist:tablename="asset.call_number" reporter:label="Call Number/Volume">
1537                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
1538                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
1539                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
1540                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
1541                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
1542                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
1543                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
1544                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
1545                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
1546                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1547                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
1548                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1549                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
1550                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
1551                 </fields>
1552                 <links>
1553                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1554                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1555                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
1556                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1557                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
1558                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
1559                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
1560                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
1561                 </links>
1562         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1563             <actions>
1564                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
1565                 <retrieve/>
1566                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
1567                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
1568             </actions>
1569         </permacrud>
1570         </class>
1571         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
1572                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
1573                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
1574                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
1575                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1576                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
1577                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1578                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
1579                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
1580                 </fields>
1581                 <links>
1582                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
1583                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
1584         </links>
1585         </class>
1586         <class id="auricnm" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri_call_number_map" oils_persist:tablename="asset.uri_call_number_map" reporter:label="Electronic Access URI to Call Number Map">
1587                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
1588                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1589                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
1590                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
1591                 </fields>
1592                 <links>
1593                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
1594                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
1595                 </links>
1596         </class>
1597         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
1598                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
1599                         <field name="id" reporter:datatype="id" />
1600                         <field name="value" oils_persist:i18n="true" />
1601                 </fields>
1602                 <links/>
1603         </class>
1604         <class id="mous" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::open_user_summary" oils_persist:tablename="money.open_usr_summary" reporter:label="Open User Summary">
1605                 <fields oils_persist:primary="usr" oils_persist:sequence="">
1606                         <field name="balance_owed" reporter:datatype="money" />
1607                         <field name="total_owed" reporter:datatype="money" />
1608                         <field name="total_paid" reporter:datatype="money" />
1609                         <field name="usr" reporter:datatype="link"/>
1610                 </fields>
1611                 <links>
1612                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1613         </links>
1614         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1615             <actions>
1616                 <retrieve permission="VIEW_USER">
1617                     <context link="usr" field="home_ou"/>
1618                 </retrieve>
1619             </actions>
1620         </permacrud>
1621         </class>
1622         <class id="mct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::collections_tracker" oils_persist:tablename="money.collections_tracker" reporter:label="Collections Tracker">
1623                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
1624                         <field name="collector" />
1625                         <field name="enter_time" reporter:datatype="timestamp"/>
1626                         <field name="id" reporter:datatype="id" />
1627                         <field name="location" reporter:datatype="link"/>
1628                         <field name="usr" reporter:datatype="link"/>
1629                 </fields>
1630                 <links>
1631                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1632                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
1633                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
1634                 </links>
1635         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1636             <actions>
1637                 <create permission="money.collections_tracker.create" context_field="location"/>
1638                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
1639                 <delete permission="money.collections_tracker.create" context_field="location"/>
1640             </actions>
1641         </permacrud>
1642         </class>
1643         <class id="bre" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::record_entry" oils_persist:tablename="biblio.record_entry" reporter:core="true" reporter:label="Bibliographic Record">
1644                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
1645                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
1646                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
1647                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
1648                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1649                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
1650                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
1651                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
1652                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
1653                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
1654                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
1655                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
1656                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
1657                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
1658                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
1659                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
1660                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
1661                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
1662                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
1663                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1664                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1665                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1666                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1667                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1668                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1669                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1670                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
1671                 </fields>
1672                 <links>
1673                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1674                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1675                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
1676                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
1677                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
1678                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
1679                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
1680                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
1681                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
1682                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
1683                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
1684                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
1685                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
1686                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
1687                 </links>
1688         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1689             <actions>
1690                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
1691                 <retrieve/>
1692                 <update permission="UPDATE_MARC" global_required="true"/>
1693             </actions>
1694         </permacrud>
1695         </class>
1696         <class id="aouhoo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit::hours_of_operation" oils_persist:tablename="actor.hours_of_operation" reporter:label="Hours of Operation">
1697                 <fields oils_persist:primary="id">
1698                         <field name="dow_0_close" />
1699                         <field name="dow_0_open" />
1700                         <field name="dow_1_close" />
1701                         <field name="dow_1_open" />
1702                         <field name="dow_2_close" />
1703                         <field name="dow_2_open" />
1704                         <field name="dow_3_close" />
1705                         <field name="dow_3_open" />
1706                         <field name="dow_4_close" />
1707                         <field name="dow_4_open" />
1708                         <field name="dow_5_close" />
1709                         <field name="dow_5_open" />
1710                         <field name="dow_6_close" />
1711                         <field name="dow_6_open" />
1712                         <field name="id" reporter:datatype="id" />
1713                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
1714                 </fields>
1715                 <links>
1716                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
1717                 </links>
1718         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1719             <actions>
1720                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
1721                 <retrieve/>
1722                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
1723                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
1724             </actions>
1725         </permacrud>
1726         </class>
1727         <class id="aoucd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit::closed_date" oils_persist:tablename="actor.org_unit_closed" reporter:label="Closed Dates">
1728                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
1729                         <field name="close_end" reporter:datatype="timestamp" />
1730                         <field name="close_start" reporter:datatype="timestamp" />
1731                         <field name="id" reporter:datatype="id" />
1732                         <field name="org_unit" reporter:datatype="org_unit"/>
1733                         <field name="reason" reporter:datatype="text"/>
1734                 </fields>
1735                 <links>
1736                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1737                 </links>
1738         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1739             <actions>
1740                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1741                 <retrieve/>
1742                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1743                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1744             </actions>
1745         </permacrud>
1746         </class>
1747         <class id="crcd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::circ_duration" oils_persist:tablename="config.rule_circ_duration" reporter:label="Circulation Duration Rule">
1748                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
1749                         <field name="extended" reporter:datatype="interval"/>
1750                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
1751                         <field name="max_renewals" reporter:datatype="int" />
1752                         <field name="name" reporter:datatype="text"/>
1753                         <field name="normal" reporter:datatype="interval"/>
1754                         <field name="shrt" reporter:datatype="interval"/>
1755                 </fields>
1756                 <links>
1757                 </links>
1758         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1759             <actions>
1760                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
1761                 <retrieve/>
1762                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
1763                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
1764             </actions>
1765         </permacrud>
1766         </class>
1767         <class id="mobts" controller="open-ils.cstore" oils_obj:fieldmapper="money::open_billable_transaction_summary" oils_persist:tablename="money.open_billable_xact_summary" reporter:label="Open Billable Transaction Summary">
1768                 <fields oils_persist:primary="id" oils_persist:sequence="">
1769                         <field name="balance_owed" reporter:datatype="money"/>
1770                         <field name="id" reporter:datatype="id" />
1771                         <field name="last_billing_note" reporter:datatype="text"/>
1772                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
1773                         <field name="last_billing_type" reporter:datatype="text"/>
1774                         <field name="last_payment_note" reporter:datatype="text"/>
1775                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
1776                         <field name="last_payment_type" reporter:datatype="text"/>
1777                         <field name="total_owed" reporter:datatype="money"/>
1778                         <field name="total_paid" reporter:datatype="money"/>
1779                         <field name="usr" reporter:datatype="link"/>
1780                         <field name="xact_finish" reporter:datatype="timestamp" />
1781                         <field name="xact_start" reporter:datatype="timestamp" />
1782                         <field name="xact_type" reporter:datatype="text"/>
1783                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
1784                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
1785                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
1786                         <field name="billing_location" reporter:datatype="link"/>
1787                 </fields>
1788                 <links>
1789                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1790                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
1791                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
1792                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
1793                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1794                 </links>
1795         </class>
1796         <class id="au" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
1797                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
1798                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
1799                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
1800                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
1801                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
1802                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
1803                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
1804                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
1805                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1806                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
1807                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
1808                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
1809                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1810                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
1811                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
1812                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
1813                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
1814                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
1815                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
1816                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1817                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
1818                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
1819                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
1820                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
1821                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
1822                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
1823                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
1824                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
1825                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
1826                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
1827                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
1828                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
1829                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
1830                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
1831                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
1832                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
1833                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
1834                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
1835                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
1836                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
1837                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
1838                         <field reporter:label="Prefix" name="prefix"  reporter:datatype="text"/>
1839                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
1840                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
1841                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
1842                         <field reporter:label="Suffix/Title" name="suffix"  reporter:datatype="text"/>
1843                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
1844                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
1845                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
1846                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
1847                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
1848                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
1849                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
1850                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1851                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
1852                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
1853                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
1854                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
1855                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
1856                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1857                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
1858                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
1859                 </fields>
1860                 <links>
1861                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
1862                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
1863                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
1864                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
1865                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
1866                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
1867                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
1868                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
1869                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
1870                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
1871                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
1872                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
1873                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
1874                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
1875                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
1876                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
1877                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
1878                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
1879                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
1880                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
1881                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
1882                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
1883                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
1884                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
1885                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
1886                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
1887                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
1888                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
1889                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
1890                 </links>
1891         </class>
1892
1893         <class id="cust" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::usr_setting_type" oils_persist:tablename="config.usr_setting_type" reporter:label="User Setting Type">
1894                 <fields oils_persist:primary="name">
1895                         <field name="name" reporter:datatype="text"/>
1896                         <field name="label" reporter:datatype="text"/>
1897                         <field name="description" reporter:datatype="text"/>
1898                         <field name="datatype" reporter:datatype="text"/>
1899                         <field name="fm_class" reporter:datatype="text"/>
1900                 </fields>
1901                 <links>
1902                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
1903                 </links>
1904                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1905                         <actions>
1906                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
1907                                 <retrieve/>
1908                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
1909                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
1910                         </actions>
1911                 </permacrud>
1912         </class>
1913         <class id="coust" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::org_unit_setting_type" oils_persist:tablename="config.org_unit_setting_type" reporter:label="Organizational Unit Setting Type">
1914                 <fields oils_persist:primary="name">
1915                         <field name="name" reporter:datatype="text"/>
1916                         <field name="label" reporter:datatype="text"/>
1917                         <field name="description" reporter:datatype="text"/>
1918                         <field name="datatype" reporter:datatype="text"/>
1919                         <field name="view_perm" reporter:datatype="link"/>
1920                         <field name="update_perm" reporter:datatype="link"/>
1921                         <field name="fm_class" reporter:datatype="text"/>
1922                 </fields>
1923                 <links>
1924                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
1925                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
1926                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
1927                 </links>
1928                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1929                         <actions>
1930                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
1931                                 <retrieve/>
1932                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
1933                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
1934                         </actions>
1935                 </permacrud>
1936         </class>
1937         <class id="aous" controller="open-ils.cstore" oils_obj:fieldmapper="actor::org_unit_setting" oils_persist:tablename="actor.org_unit_setting" reporter:label="Organizational Unit Setting">
1938                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
1939                         <field name="id" />
1940                         <field name="name"  reporter:datatype="text"/>
1941                         <field name="org_unit" reporter:datatype="org_unit"/>
1942                         <field name="value"  reporter:datatype="text"/>
1943                 </fields>
1944                 <links>
1945                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1946                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
1947                 </links>
1948         </class>
1949         <class id="acpn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_note" oils_persist:tablename="asset.copy_note" reporter:label="Copy Note">
1950                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
1951                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1952                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
1953                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1954                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
1955                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1956                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
1957                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
1958                 </fields>
1959                 <links>
1960                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
1961                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1962                 </links>
1963         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1964             <actions>
1965                 <create permission="CREATE_COPY_NOTE">
1966                     <context link="owning_copy" field="circ_lib"/>
1967                 </create>
1968                 <retrieve permission="VIEW_COPY_NOTES">
1969                     <context link="owning_copy" field="circ_lib"/>
1970                 </retrieve>
1971                 <update permission="UPDATE_COPY_NOTE">
1972                     <context link="owning_copy" field="circ_lib"/>
1973                 </update>
1974                 <delete permission="DELETE_COPY_NOTE">
1975                     <context link="owning_copy" field="circ_lib"/>
1976                 </delete>
1977             </actions>
1978         </permacrud>
1979         </class>
1980         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
1981                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
1982                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
1983                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
1984                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
1985                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
1986                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
1987                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
1988                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
1989                 </fields>
1990                 <links>
1991                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
1992                 </links>
1993         </class>
1994         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
1995                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
1996                         <field name="fingerprint"  reporter:datatype="text"/>
1997                         <field name="id" reporter:datatype="id" />
1998                         <field name="master_record" reporter:datatype="link"/>
1999                         <field name="mods"  reporter:datatype="text"/>
2000                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
2001                 </fields>
2002                 <links>
2003                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
2004                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
2005                 </links>
2006         </class>
2007         <class id="cnal" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::net_access_level" oils_persist:tablename="config.net_access_level" reporter:label="Net Access Level">
2008                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
2009                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2010                         <field name="name"  reporter:datatype="text"/>
2011                 </fields>
2012                 <links/>
2013         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2014             <actions>
2015                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
2016                 <retrieve/>
2017                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
2018                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
2019             </actions>
2020         </permacrud>
2021         </class>
2022         <class id="ppl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::perm_list" oils_persist:tablename="permission.perm_list" reporter:label="Permission List">
2023                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
2024                         <field name="code"  reporter:datatype="text"/>
2025                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
2026                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
2027                 </fields>
2028                 <links/>
2029         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2030             <actions>
2031                 <create permission="CREATE_PERM" global_required="true"/>
2032                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
2033                 <update permission="UPDATE_PERM" global_required="true"/>
2034                 <delete permission="DELETE_PERM" global_required="true"/>
2035             </actions>
2036         </permacrud>
2037         </class>
2038         <class id="mmrsm" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord_source_map" oils_persist:tablename="metabib.metarecord_source_map" oils_persist:field_safe="true" reporter:label="Metarecord Source Map">
2039                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
2040                         <field name="id" reporter:datatype="id" />
2041                         <field name="metarecord" reporter:datatype="link"/>
2042                         <field name="source" reporter:datatype="link"/>
2043                 </fields>
2044                 <links>
2045                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2046                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
2047                 </links>
2048         </class>
2049         <class id="mkfe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::keyword_field_entry" oils_persist:tablename="metabib.keyword_field_entry" reporter:label="Keyword Field Entry">
2050                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
2051                         <field name="field" reporter:datatype="link"/>
2052                         <field name="id" reporter:datatype="id" />
2053                         <field name="source" reporter:datatype="link"/>
2054                         <field name="value"  reporter:datatype="text"/>
2055                 </fields>
2056                 <links>
2057                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2058                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2059                 </links>
2060         </class>
2061         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
2062                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2063                         <field name="accepting_usr" reporter:datatype="link"/>
2064                         <field name="amount" reporter:datatype="money" />
2065                         <field name="amount_collected" reporter:datatype="money" />
2066                         <field name="cash_drawer" reporter:datatype="link"/>
2067                         <field name="id" reporter:datatype="id" />
2068                         <field name="note"  reporter:datatype="text"/>
2069                         <field name="payment_ts" reporter:datatype="timestamp"/>
2070                         <field name="xact" reporter:datatype="link"/>
2071                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2072                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2073                 </fields>
2074                 <links>
2075                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2076                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2077                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2078                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2079                 </links>
2080         </class>
2081         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
2082                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2083                         <field name="accepting_usr" reporter:datatype="link"/>
2084                         <field name="amount" reporter:datatype="money" />
2085                         <field name="amount_collected" reporter:datatype="money" />
2086                         <field name="id" reporter:datatype="id" />
2087                         <field name="note"  reporter:datatype="text"/>
2088                         <field name="payment_ts" reporter:datatype="timestamp"/>
2089                         <field name="xact" reporter:datatype="link"/>
2090                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2091                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2092                 </fields>
2093                 <links>
2094                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2095                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2096                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2097                 </links>
2098         </class>
2099         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
2100                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
2101                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
2102                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2103                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2104                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
2105                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2106                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2107                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
2108                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2109                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
2110                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2111                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2112                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
2113                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2114                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
2115                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
2116                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
2117                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
2118                 </fields>
2119                 <links>
2120                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2121                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
2122                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
2123                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
2124                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
2125                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
2126                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
2127                 </links>
2128         </class>
2129
2130         <class id="csp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::standing_penalty" oils_persist:tablename="config.standing_penalty" reporter:label="Standing Penalty">
2131                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
2132                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2133                         <field name="name"  reporter:datatype="text"/>
2134                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
2135                         <field name="block_list" reporter:datatype="text"/>
2136                         <field name="org_depth" reporter:datatype="int"/>
2137                 </fields>
2138                 <links/>
2139         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2140             <actions>
2141                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2142                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
2143                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2144                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2145             </actions>
2146         </permacrud>
2147         </class>
2148         <class id="pgpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::grp_penalty_threshold" oils_persist:tablename="permission.grp_penalty_threshold" reporter:label="Group Penalty Threshold">
2149                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
2150                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
2151                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
2152                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
2153                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
2154                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
2155                 </fields>
2156                 <links>
2157                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
2158                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
2159                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2160         </links>
2161         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2162             <actions>
2163                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2164                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2165                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2166                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2167             </actions>
2168         </permacrud>
2169         </class>
2170         <class id="ccs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::copy_status" oils_persist:tablename="config.copy_status" oils_persist:restrict_primary="100" reporter:label="Copy Status">
2171                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
2172                         <field name="holdable" reporter:datatype="bool"/>
2173                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2174                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2175                         <field name="opac_visible" reporter:datatype="bool"/>
2176                 </fields>
2177                 <links/>
2178         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2179             <actions>
2180                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
2181                 <retrieve permission="CREATE_COPY_STATUS UPDATE_COPY_STATUS DELETE_COPY_STATUS" global_required="true"/>
2182                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
2183                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
2184             </actions>
2185         </permacrud>
2186         </class>
2187         <class id="ausp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user_standing_penalty" oils_persist:tablename="actor.usr_standing_penalty" oils_persist:restrict_primary="100" reporter:label="User Standing Penalty">
2188                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
2189                         <field name="id" reporter:datatype="id" reporter:label="ID" />
2190                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
2191                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
2192                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
2193                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
2194                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
2195                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
2196                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
2197                 </fields>
2198                 <links>
2199                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2200                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2201                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2202                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
2203                 </links>
2204                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2205                         <actions>
2206                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
2207                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
2208                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
2209                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
2210                         </actions>
2211                 </permacrud>
2212         </class>
2213         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
2214                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
2215                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
2216                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
2217                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
2218                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
2219                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
2220                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
2221                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
2222                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
2223                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
2224                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2225                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
2226                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
2227                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
2228                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
2229                 </fields>
2230                 <links>
2231                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2232                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
2233                 </links>
2234         </class>
2235         <class id="acnn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_note" oils_persist:tablename="asset.call_number_note" reporter:label="Call Number Note">
2236                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
2237                         <field name="call_number" />
2238                         <field name="create_date" reporter:datatype="timestamp"/>
2239                         <field name="creator" reporter:datatype="link"/>
2240                         <field name="id" reporter:datatype="id" />
2241                         <field name="pub" reporter:datatype="bool"/>
2242                         <field name="title"  reporter:datatype="text"/>
2243                         <field name="value"  reporter:datatype="text"/>
2244                 </fields>
2245                 <links>
2246                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2247                 </links>
2248         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2249             <actions>
2250                 <create permission="CREATE_VOLUME_NOTE">
2251                     <context link="call_number" field="owning_lib"/>
2252                 </create>
2253                 <retrieve permission="VIEW_VOLUME_NOTES">
2254                     <context link="call_number" field="owning_lib"/>
2255                 </retrieve>
2256                 <update permission="UPDATE_VOLUME_NOTE">
2257                     <context link="call_number" field="owning_lib"/>
2258                 </update>
2259                 <delete permission="DELETE_VOLUME_NOTE">
2260                     <context link="call_number" field="owning_lib"/>
2261                 </delete>
2262             </actions>
2263         </permacrud>
2264         </class>
2265         <class id="arn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::record_note" oils_persist:tablename="authority.record_note" reporter:label="Authority Record Note">
2266                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
2267                         <field name="create_date" reporter:datatype="timestamp"/>
2268                         <field name="creator" reporter:datatype="link"/>
2269                         <field name="edit_date" reporter:datatype="timestamp"/>
2270                         <field name="editor" reporter:datatype="link"/>
2271                         <field name="id" reporter:datatype="id" />
2272                         <field name="record" reporter:datatype="link"/>
2273                         <field name="value" reporter:datatype="text"/>
2274                 </fields>
2275                 <links>
2276                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2277                 </links>
2278         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2279             <actions>
2280                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2281                 <retrieve permission="VIEW_AUTHORITY_RECORD_NOTES" global_required='true'/>
2282                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2283                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2284             </actions>
2285         </permacrud>
2286         </class>
2287         <class id="circ" controller="open-ils.cstore" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
2288                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2289                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2290                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2291                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2292                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2293                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2294                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2295                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2296                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2297                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2298                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2299                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2300                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2301                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2302                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2303                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2304                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2305                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2306                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2307                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2308                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2309                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2310                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
2311                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2312                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2313                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2314                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2315                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
2316                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
2317                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
2318                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2319                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2320                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2321                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2322                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2323                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2324                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
2325                 </fields>
2326                 <links>
2327                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2328                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2329                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2330                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2331                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2332                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2333                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2334                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2335                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2336                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2337                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2338                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2339                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2340                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2341                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2342                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2343                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
2344                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
2345                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
2346                 </links>
2347         </class>
2348         <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">
2349                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2350                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2351                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2352                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2353                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2354                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2355                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2356                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2357                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2358                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2359                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2360                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2361                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2362                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2363                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2364                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2365                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2366                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2367                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2368                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2369                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2370                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2371                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
2372                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2373                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2374                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2375                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2376                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2377                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2378                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2379                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2380                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2381                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
2382                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
2383                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
2384                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
2385                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
2386                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
2387                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
2388                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
2389                 </fields>
2390                 <links>
2391                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2392                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2393                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2394                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2395                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2396                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2397                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2398                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2399                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2400                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2401                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2402                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2403                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2404                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2405                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
2406                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2407                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2408                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2409                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
2410                 </links>
2411         </class>
2412         <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">
2413                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2414                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2415                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2416                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2417                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2418                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2419                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2420                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2421                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2422                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2423                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2424                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2425                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2426                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2427                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2428                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2429                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2430                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2431                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2432                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2433                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2434                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2435                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
2436                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2437                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2438                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2439                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2440                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
2441                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
2442                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
2443                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2444                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2445                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2446                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2447                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2448                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2449                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
2450                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
2451                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
2452                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
2453                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
2454                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
2455                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
2456                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
2457                 </fields>
2458                 <links>
2459                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2460                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2461                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2462                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2463                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2464                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2465                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2466                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2467                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2468                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2469                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2470                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2471                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2472                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2473                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
2474                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2475                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2476                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2477                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
2478                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2479                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
2480                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
2481                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
2482                 </links>
2483         </class>
2484
2485         <class id="brt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource_type" oils_persist:tablename="booking.resource_type" reporter:label="Resource Type">
2486                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
2487                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id"/>
2488                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
2489                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2490                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
2491                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
2492                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2493                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
2494                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
2495                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
2496                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
2497                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
2498                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2499                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
2500                 </fields>
2501                 <links>
2502                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2503                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2504                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
2505                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
2506                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
2507                 </links>
2508                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2509                         <actions>
2510                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2511                                 <retrieve />
2512                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2513                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2514                         </actions>
2515                 </permacrud>
2516         </class>
2517
2518         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
2519                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
2520                         <field reporter:label="Resource ID" name="id" reporter:datatype="id"/>
2521                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2522                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
2523                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
2524                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
2525                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
2526                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
2527                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
2528                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2529                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
2530                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
2531                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
2532                 </fields>
2533                 <links>
2534                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2535                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
2536                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
2537                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
2538                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
2539                 </links>
2540                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2541                         <actions>
2542                                 <create permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
2543                                 <retrieve />
2544                                 <update permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
2545                                 <delete permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
2546                         </actions>
2547                 </permacrud>
2548         </class>
2549         
2550         <class id="bra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource_attr" oils_persist:tablename="booking.resource_attr" reporter:label="Resource Attribute">
2551                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
2552                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id"/>
2553                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2554                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
2555                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
2556                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
2557                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
2558                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2559                 </fields>
2560                 <links>
2561                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2562                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
2563                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
2564                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
2565                 </links>
2566                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2567                         <actions>
2568                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
2569                                 <retrieve />
2570                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
2571                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
2572                         </actions>
2573                 </permacrud>
2574         </class>
2575         
2576         <class id="brav" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource_attr_value" oils_persist:tablename="booking.resource_attr_value" reporter:label="Resource Attribute Value">
2577                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
2578                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id"/>
2579                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2580                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
2581                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
2582                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2583                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2584                 </fields>
2585                 <links>
2586                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2587                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
2588                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
2589                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
2590                 </links>
2591                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2592                         <actions>
2593                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
2594                                 <retrieve />
2595                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
2596                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
2597                         </actions>
2598                 </permacrud>
2599         </class>
2600         
2601         <class id="bram" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource_attr_map" oils_persist:tablename="booking.resource_attr_map" reporter:label="Resource Attribute Map">
2602                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
2603                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
2604                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
2605                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
2606                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
2607                 </fields>
2608                 <links>
2609                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
2610                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
2611                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
2612                 </links>
2613                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2614                         <actions>
2615                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
2616                                 <retrieve />
2617                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
2618                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
2619                         </actions>
2620                 </permacrud>
2621         </class>
2622         
2623         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
2624                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2625                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
2626                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2627                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
2628                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
2629                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
2630                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2631                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2632                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2633                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2634                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
2635                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2636                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
2637                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
2638                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
2639                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
2640                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
2641                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
2642                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
2643                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2644                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
2645                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
2646                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
2647                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
2648                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
2649                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
2650                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
2651                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
2652                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2653                 </fields>
2654                 <links>
2655                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2656                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2657                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2658                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2659                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2660                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
2661                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
2662                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
2663                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
2664                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
2665                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
2666                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
2667                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
2668                 </links>
2669                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2670                         <actions>
2671                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
2672                                 <retrieve />
2673                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
2674                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
2675                         </actions>
2676                 </permacrud>
2677         </class>
2678         
2679         <class id="bravm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation_attr_value_map" oils_persist:tablename="booking.reservation_attr_value_map" reporter:label="Reservation Attribute Value Map">
2680                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
2681                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
2682                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
2683                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
2684                 </fields>
2685                 <links>
2686                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
2687                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
2688                 </links>
2689                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2690                         <actions>
2691                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
2692                                 <retrieve />
2693                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
2694                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
2695                         </actions>
2696                 </permacrud>
2697         </class>
2698
2699         <class id="ccnbi" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket_item" oils_persist:tablename="container.call_number_bucket_item" reporter:label="Call Number Bucket Item">
2700                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
2701                         <field name="bucket" reporter:datatype="link"/>
2702                         <field name="id" reporter:datatype="id" />
2703                         <field name="target_call_number" reporter:datatype="link" />
2704                         <field name="create_time" reporter:datatype="timestamp" />
2705                         <field name="pos" reporter:datatype="int" />
2706                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2707                 </fields>
2708                 <links>
2709                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
2710                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
2711             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
2712                 </links>
2713         </class>
2714         <class id="ccnbin" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket_item_note" oils_persist:tablename="container.call_number_bucket_item_note" reporter:label="Call Number Bucket Item Note">
2715                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
2716                         <field name="id" reporter:datatype="id" />
2717                         <field name="item" reporter:datatype="link"/>
2718                         <field name="note" reporter:datatype="text" />
2719                 </fields>
2720                 <links>
2721                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
2722                 </links>
2723         </class>
2724         <class id="cbreb" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket" oils_persist:tablename="container.biblio_record_entry_bucket" reporter:label="Bibliographic Record Entry Bucket">
2725                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
2726                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
2727                         <field name="btype" reporter:datatype="text"/>
2728                         <field name="id" reporter:datatype="id" />
2729                         <field name="name" reporter:datatype="text"/>
2730                         <field name="owner" reporter:datatype="link"/>
2731                         <field name="pub" reporter:datatype="bool"/>
2732                         <field name="create_time" reporter:datatype="timestamp" />
2733                 </fields>
2734                 <links>
2735                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
2736                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
2737                 </links>
2738         </class>
2739         <class id="cbrebn" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket_note" oils_persist:tablename="container.biblio_record_entry_bucket_note" reporter:label="Bibliographic Record Entry Bucket Note">
2740                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
2741                         <field name="id" reporter:datatype="id" />
2742                         <field name="bucket" reporter:datatype="link"/>
2743                         <field name="note" reporter:datatype="text" />
2744                 </fields>
2745                 <links>
2746                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
2747                 </links>
2748         </class>
2749         <class id="ahcm" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_copy_map" oils_persist:tablename="action.hold_copy_map" reporter:label="Hold Copy Map">
2750                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
2751                         <field name="hold" reporter:datatype="link"/>
2752                         <field name="id" reporter:datatype="id" />
2753                         <field name="target_copy" reporter:datatype="link"/>
2754                 </fields>
2755                 <links>
2756                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
2757                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2758                 </links>
2759         </class>
2760         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
2761                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
2762                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
2763                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
2764                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
2765                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
2766                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
2767                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
2768                 </fields>
2769                 <links>
2770                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
2771                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
2772                 </links>
2773         </class>
2774         <class id="acpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location" oils_persist:tablename="asset.copy_location" reporter:label="Copy/Shelving Location">
2775                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
2776                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
2777                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
2778                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
2779                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2780                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2781                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
2782                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
2783                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
2784                 </fields>
2785                 <links>
2786                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2787                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
2788                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
2789                 </links>
2790         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2791             <actions>
2792                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
2793                 <retrieve/>
2794                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
2795                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
2796             </actions>
2797         </permacrud>
2798         </class>
2799
2800     <class id="acplo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location_order" oils_persist:tablename="asset.copy_location_order" reporter:label="Copy/Shelving Location Order">
2801         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
2802             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
2803             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
2804             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
2805             <field reporter:label="Position" name="position" reporter:datatype="int"/>
2806         </fields>
2807         <links>
2808             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
2809             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
2810         </links>
2811         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2812             <actions>
2813                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
2814                 <retrieve/>
2815                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
2816                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
2817             </actions>
2818         </permacrud>
2819     </class>
2820
2821         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
2822                 <fields>
2823                         <field name="id" oils_persist:virtual="true" />
2824                         <field name="location" oils_persist:virtual="true" />
2825                         <field name="owning_lib" oils_persist:virtual="true" />
2826                         <field name="holdings" oils_persist:virtual="true" />
2827                         <field name="current_holdings" oils_persist:virtual="true" />
2828                         <field name="supplements" oils_persist:virtual="true" />
2829                         <field name="current_supplements" oils_persist:virtual="true" />
2830                         <field name="indexes" oils_persist:virtual="true" />
2831                         <field name="current_indexes" oils_persist:virtual="true" />
2832                         <field name="online" oils_persist:virtual="true" />
2833                         <field name="missing" oils_persist:virtual="true" />
2834                         <field name="incomplete" oils_persist:virtual="true" />
2835                 </fields>
2836         </class>
2837         <class id="sre" controller="open-ils.pcrud open-ils.cstore" oils_obj:fieldmapper="serial::record_entry" oils_persist:tablename="serial.record_entry" reporter:label="Serial Record Entry">
2838                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
2839                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
2840                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2841                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
2842                         <field reporter:label="Creator" name="creator" />
2843                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2844                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
2845                         <field reporter:label="Editor" name="editor" />
2846                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2847                         <field reporter:label="Last Transaction ID" name="last_xact_id" />
2848                         <field reporter:label="MARC" name="marc" />
2849                         <field reporter:label="Source" name="source" />
2850                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
2851                 </fields>
2852                 <links>
2853                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2854                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2855                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2856                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2857                 </links>
2858                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2859                         <actions>
2860                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
2861                                 <retrieve/>
2862                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
2863                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
2864                         </actions>
2865                 </permacrud>
2866         </class>
2867         <class id="ssub" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
2868                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
2869                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
2870                         <field reporter:label="Call Number" name="call_number" reporter:datatype="link"/>
2871                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
2872                         <field reporter:label="Start date" name="start_date" reporter:datatype="timestamp"/>
2873                         <field reporter:label="End date" name="end_date" reporter:datatype="timestamp"/>
2874                 </fields>
2875                 <links>
2876                         <link field="call_number" reltype="might_have" key="id" map="" class="acn"/>
2877                         <link field="uri" reltype="might_have" key="id" map="" class="auri"/>
2878                 </links>
2879         </class>
2880         <class id="sbu" controller="open-ils.cstore" oils_obj:fieldmapper="serial::binding_unit" oils_persist:tablename="serial.binding_unit" reporter:label="Binding Unit">
2881                 <fields oils_persist:primary="id" oils_persist:sequence="serial.binding_unit_id_seq">
2882                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
2883                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
2884                         <field reporter:label="Label" name="label" />
2885                 </fields>
2886                 <links>
2887                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2888                 </links>
2889         </class>
2890         <class id="siss" controller="open-ils.cstore" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
2891                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
2892                         <field name="id" reporter:datatype="id" />
2893                         <field name="subscription" reporter:datatype="link"/>
2894                         <field name="target_copy" reporter:datatype="link"/>
2895                         <field name="location" reporter:datatype="link"/>
2896                         <field name="binding_unit" reporter:datatype="link"/>
2897                         <field name="label" />
2898                 </fields>
2899                 <links>
2900                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2901                         <link field="target_copy" reltype="might_have" key="id" map="" class="acp"/>
2902                         <link field="location" reltype="might_have" key="id" map="" class="acpl"/>
2903                         <link field="binding_unit" reltype="might_have" key="id" map="" class="sbu"/>
2904                 </links>
2905         </class>
2906         <class id="sbsum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::bib_summary" oils_persist:tablename="serial.bib_summary" reporter:label="Bib Summary">
2907                 <fields oils_persist:primary="id" oils_persist:sequence="serial.bib_summary_id_seq">
2908                         <field name="id" reporter:datatype="id" />
2909                         <field name="subscription" reporter:datatype="link"/>
2910                         <field name="generated_coverage" reporter:datatype="text"/>
2911                         <field name="textual_holdings" reporter:datatype="text"/>
2912                 </fields>
2913                 <links>
2914                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2915                 </links>
2916         </class>
2917         <class id="sssum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::sup_summary" oils_persist:tablename="serial.sup_summary" reporter:label="Supplemental Issue Summary">
2918                 <fields oils_persist:primary="id" oils_persist:sequence="serial.sup_summary_id_seq">
2919                         <field name="id" reporter:datatype="id" />
2920                         <field name="subscription" reporter:datatype="link"/>
2921                         <field name="generated_coverage" reporter:datatype="text"/>
2922                         <field name="textual_holdings" reporter:datatype="text"/>
2923                 </fields>
2924                 <links>
2925                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2926                 </links>
2927         </class>
2928         <class id="sisum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::index_summary" oils_persist:tablename="serial.index_summary" reporter:label="Index Summary">
2929                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
2930                         <field name="id" reporter:datatype="id" />
2931                         <field name="subscription" reporter:datatype="link"/>
2932                         <field name="generated_coverage" reporter:datatype="text"/>
2933                         <field name="textual_holdings" reporter:datatype="text"/>
2934                 </fields>
2935                 <links>
2936                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2937                 </links>
2938         </class>
2939
2940         <class id="ascecm" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat_entry_copy_map" oils_persist:tablename="asset.stat_cat_entry_copy_map" reporter:label="Statistical Category Entry Copy Map">
2941                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
2942                         <field name="id" reporter:datatype="id" />
2943                         <field name="owning_copy" reporter:datatype="link"/>
2944                         <field name="stat_cat" reporter:datatype="link"/>
2945                         <field name="stat_cat_entry" reporter:datatype="link"/>
2946                 </fields>
2947                 <links>
2948                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2949                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
2950                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
2951                 </links>
2952         </class>
2953         <class id="citm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::item_type_map" oils_persist:tablename="config.item_type_map" reporter:label="Item Type Map" oils_persist:field_safe="true">
2954                 <fields oils_persist:primary="code">
2955                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2956                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2957                 </fields>
2958                 <links/>
2959         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2960             <actions>
2961                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2962                 <retrieve/>
2963                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2964                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2965             </actions>
2966         </permacrud>
2967         </class>
2968         <class id="cblvl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::bib_level_map" oils_persist:tablename="config.bib_level_map" reporter:label="Bib Level Map" oils_persist:field_safe="true">
2969                 <fields oils_persist:primary="code">
2970                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
2971                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2972                 </fields>
2973                 <links/>
2974         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2975             <actions>
2976                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2977                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
2978                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2979                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2980             </actions>
2981         </permacrud>
2982         </class>
2983         <class id="sra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="search::relevance_adjustment" oils_persist:tablename="search.relevance_adjustment" reporter:label="Relevance Adjustment">
2984                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
2985                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
2986                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
2987                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
2988                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
2989                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
2990                 </fields>
2991                 <links>
2992             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2993         </links>
2994         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2995             <actions>
2996                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
2997                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
2998                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
2999                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3000             </actions>
3001         </permacrud>
3002         </class>
3003         <class id="lasso" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_lasso" oils_persist:tablename="actor.org_lasso" reporter:label="Org Lasso">
3004                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
3005                         <field name="id" reporter:datatype="id" />
3006                         <field name="name" reporter:datatype="text"/>
3007                 </fields>
3008                 <links/>
3009         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3010             <actions>
3011                 <create permission="CREATE_LASSO" global_required="true"/>
3012                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
3013                 <update permission="UPDATE_LASSO" global_required="true"/>
3014                 <delete permission="DELETE_LASSO" global_required="true"/>
3015             </actions>
3016         </permacrud>
3017         </class>
3018         <class id="lmap" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_lasso_map" oils_persist:tablename="actor.org_lasso_map" reporter:label="Org Lasso Map">
3019                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
3020                         <field name="id" reporter:datatype="id" />
3021                         <field name="lasso" reporter:datatype="link"/>
3022                         <field name="org_unit" reporter:datatype="org_unit"/>
3023                 </fields>
3024                 <links>
3025                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
3026                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3027                 </links>
3028         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3029             <actions>
3030                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
3031                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
3032                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
3033                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
3034             </actions>
3035         </permacrud>
3036         </class>
3037         <class id="aoup" controller="open-ils.cstore" oils_obj:fieldmapper="actor::org_unit_proximity" oils_persist:tablename="actor.org_unit_proximity" reporter:label="Org Unit Proximity">
3038                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
3039                         <field name="id" reporter:datatype="id" />
3040                         <field name="from_org" reporter:datatype="org_unit"/>
3041                         <field name="to_org" reporter:datatype="org_unit"/>
3042                         <field name="prox" reporter:datatype="int" />
3043                 </fields>
3044                 <links>
3045                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
3046                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
3047                 </links>
3048         </class>
3049         <class id="ssr" controller="open-ils.cstore" oils_obj:fieldmapper="search::search_result" oils_persist:tablename="search.search_result" oils_persist:readonly="true" reporter:label="Search Result">
3050                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
3051                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3052                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
3053                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
3054                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
3055                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
3056                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
3057                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
3058                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
3059                 </fields>
3060                 <links/>
3061         </class>
3062         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
3063                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
3064                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
3065                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
3066                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
3067                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
3068                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
3069                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3070                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
3071                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3072                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
3073                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
3074                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
3075                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
3076                 </fields>
3077                 <links>
3078                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3079                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
3080                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
3081                 </links>
3082         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3083             <actions>
3084                 <create permission="ADMIN_SURVEY" context_field="owner"/>
3085                 <retrieve/>
3086                 <update permission="ADMIN_SURVEY" context_field="owner"/>
3087                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
3088             </actions>
3089         </permacrud>
3090         </class>
3091         <class id="aoa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_address" oils_persist:tablename="actor.org_address" reporter:label="Org Address">
3092                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
3093                         <field name="address_type"  reporter:datatype="text"/>
3094                         <field name="city"  reporter:datatype="text"/>
3095                         <field name="country"  reporter:datatype="text"/>
3096                         <field name="county"  reporter:datatype="text"/>
3097                         <field name="id" reporter:datatype="id" />
3098                         <field name="org_unit" reporter:datatype="org_unit"/>
3099                         <field name="post_code"  reporter:datatype="text"/>
3100                         <field name="state"  reporter:datatype="text"/>
3101                         <field name="street1"  reporter:datatype="text"/>
3102                         <field name="street2"  reporter:datatype="text"/>
3103                         <field name="valid" reporter:datatype="bool"/>
3104                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
3105                 </fields>
3106                 <links>
3107                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3108                 </links>
3109         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3110             <actions>
3111                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
3112                 <retrieve/>
3113                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
3114                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
3115             </actions>
3116         </permacrud>
3117         </class>
3118         <class id="ahr" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_request" oils_persist:tablename="action.hold_request" reporter:core="true" reporter:label="Hold Request">
3119                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
3120                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
3121                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
3122                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
3123                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
3124                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
3125                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
3126                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
3127                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
3128                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
3129                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
3130                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
3131                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
3132                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
3133                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
3134                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
3135                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
3136                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
3137                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
3138                         <field reporter:label="Item Selection Depth" name="selection_depth" />
3139                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
3140                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
3141                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
3142                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
3143                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
3144                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
3145                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
3146                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
3147                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
3148                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
3149                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
3150                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
3151                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
3152                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
3153                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
3154                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
3155                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
3156                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
3157                 </fields>
3158                 <links>
3159                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
3160                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
3161                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
3162                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
3163                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
3164                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
3165                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3166                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3167                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
3168                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
3169                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
3170                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
3171                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
3172                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
3173                 </links>
3174         </class>
3175         <class id="ahrn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_request_note" oils_persist:tablename="action.hold_request_note" reporter:label="Hold Request Note">
3176                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
3177                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3178                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
3179                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3180                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
3181                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
3182                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
3183                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
3184                 </fields>
3185                 <links>
3186                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3187                 </links>
3188                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3189                         <actions>
3190                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
3191                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
3192                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
3193                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
3194                         </actions>
3195                 </permacrud>
3196         </class>
3197         <class id="aou" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit" oils_persist:tablename="actor.org_unit" reporter:label="Organizational Unit" oils_persist:field_safe="true">
3198                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
3199                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3200                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
3201                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
3202                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
3203                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
3204                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3205                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3206                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
3207                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
3208                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text"/>
3209                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
3210                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
3211                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3212                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
3213                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
3214                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
3215                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3216                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3217                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3218                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3219                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
3220                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3221                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
3222                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
3223                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3224                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
3225                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3226                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3227                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3228                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
3229                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
3230                 </fields>
3231                 <links>
3232                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
3233                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
3234                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
3235                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
3236                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
3237                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
3238                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
3239                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
3240                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
3241                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
3242                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
3243                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
3244                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
3245                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
3246                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
3247                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
3248                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
3249                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
3250                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
3251                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
3252                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
3253                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
3254                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
3255                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
3256                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
3257                 </links>
3258         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3259             <actions>
3260                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
3261                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
3262                     <context field="id"/>
3263                     <context field="parent_ou"/>
3264                                 </retrieve>
3265                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
3266                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
3267             </actions>
3268         </permacrud>
3269         </class>
3270         <class id="ccnb" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket" oils_persist:tablename="container.call_number_bucket" reporter:label="Call Number Bucket">
3271                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
3272                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3273                         <field name="btype" reporter:datatype="text"/>
3274                         <field name="id" reporter:datatype="id" />
3275                         <field name="name"  reporter:datatype="text"/>
3276                         <field name="owner" reporter:datatype="link"/>
3277                         <field name="pub" reporter:datatype="bool"/>
3278                         <field name="create_time" reporter:datatype="timestamp" />
3279                 </fields>
3280                 <links>
3281                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3282                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
3283                 </links>
3284         </class>
3285         <class id="ccnbn" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket_note" oils_persist:tablename="container.call_number_bucket_note" reporter:label="Call Number Bucket Note">
3286                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
3287                         <field name="id" reporter:datatype="id" />
3288                         <field name="bucket" reporter:datatype="link"/>
3289                         <field name="note" reporter:datatype="text" />
3290                 </fields>
3291                 <links>
3292                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3293                 </links>
3294         </class>
3295         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
3296                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
3297                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
3298                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3299                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3300                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3301                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3302                 </fields>
3303                 <links>
3304                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3305                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
3306                 </links>
3307         </class>
3308         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
3309                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
3310                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
3311                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3312                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
3313                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3314                 </fields>
3315                 <links>
3316                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3317                 </links>
3318         </class>
3319         <class id="actsc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::stat_cat" oils_persist:tablename="actor.stat_cat" reporter:label="User Statistical Category">
3320                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
3321                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
3322                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3323                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3324                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3325                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3326                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
3327                 </fields>
3328                 <links>
3329                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3330                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
3331                 </links>
3332         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3333             <actions>
3334                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
3335                 <retrieve />
3336                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
3337                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
3338             </actions>
3339         </permacrud>
3340         </class>
3341         <class id="msefe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::series_field_entry" oils_persist:tablename="metabib.series_field_entry" reporter:label="Series Field Entry">
3342                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
3343                         <field name="field" reporter:datatype="link"/>
3344                         <field name="id" reporter:datatype="id" />
3345                         <field name="source" reporter:datatype="link"/>
3346                         <field name="value"  reporter:datatype="text"/>
3347                 </fields>
3348                 <links>
3349                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3350                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3351                 </links>
3352         </class>
3353         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
3354                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
3355                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3356                         <field name="btype" reporter:datatype="text"/>
3357                         <field name="id" reporter:datatype="id" />
3358                         <field name="name"  reporter:datatype="text"/>
3359                         <field name="owner" reporter:datatype="link"/>
3360                         <field name="pub" reporter:datatype="bool"/>
3361                         <field name="create_time" reporter:datatype="timestamp" />
3362                 </fields>
3363                 <links>
3364                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3365                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
3366                 </links>
3367         </class>
3368         <class id="cubn" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket_note" oils_persist:tablename="container.user_bucket_note" reporter:label="User Bucket Note">
3369                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
3370                         <field name="id" reporter:datatype="id" />
3371                         <field name="bucket" reporter:datatype="link"/>
3372                         <field name="note" reporter:datatype="text" />
3373                 </fields>
3374                 <links>
3375                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
3376                 </links>
3377         </class>
3378         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
3379                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3380                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3381                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3382                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3383                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
3384                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
3385                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3386                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
3387                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3388                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3389                 </fields>
3390                 <links>
3391                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3392                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3393                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3394                 </links>
3395         </class>
3396         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
3397                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
3398                         <field name="id" reporter:datatype="id" />
3399                         <field name="ind1" />
3400                         <field name="ind2" />
3401                         <field name="record" />
3402                         <field name="subfield" />
3403                         <field name="tag" />
3404                         <field name="value" />
3405                 </fields>
3406                 <links>
3407                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3408                 </links>
3409         </class>
3410         <class id="cnct" controller="open-ils.cstore" oils_obj:fieldmapper="config::non_cataloged_type" oils_persist:tablename="config.non_cataloged_type" reporter:label="Non-cataloged Type">
3411                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
3412                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
3413                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3414                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
3415                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3416                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3417                 </fields>
3418                 <links>
3419                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3420                 </links>
3421         </class>
3422         <class id="aout" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_type" oils_persist:tablename="actor.org_unit_type" reporter:label="Organizational Unit Type">
3423                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
3424                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
3425                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
3426                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
3427                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
3428                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3429                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3430                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
3431                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
3432                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
3433                 </fields>
3434                 <links>
3435                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
3436                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
3437                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
3438                 </links>
3439         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3440             <actions>
3441                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
3442                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT" global_required="true"/>
3443                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
3444                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
3445             </actions>
3446         </permacrud>
3447         </class>
3448         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
3449                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
3450                         <field name="create_date" reporter:datatype="timestamp"/>
3451                         <field name="creator" reporter:datatype="link"/>
3452                         <field name="edit_date" reporter:datatype="timestamp"/>
3453                         <field name="editor" reporter:datatype="link"/>
3454                         <field name="id" reporter:datatype="id" />
3455                         <field name="pub" reporter:datatype="bool"/>
3456                         <field name="record" reporter:datatype="link"/>
3457                         <field name="value"  reporter:datatype="text"/>
3458                 </fields>
3459                 <links>
3460                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3461                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3462                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3463                 </links>
3464         </class>
3465         <class id="mucs" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_circulation_summary" oils_persist:tablename="money.usr_circulation_summary" reporter:label="User Circulation Summary">
3466                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3467                         <field name="balance_owed" reporter:datatype="money" />
3468                         <field name="total_owed" reporter:datatype="money" />
3469                         <field name="total_paid" reporter:datatype="money" />
3470                         <field name="usr" reporter:datatype="link"/>
3471                 </fields>
3472                 <links>
3473                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3474                 </links>
3475         </class>
3476         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
3477                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3478                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
3479                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3480                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
3481                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3482                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
3483                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
3484                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3485                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3486                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3487                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3488                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3489                 </fields>
3490                 <links>
3491                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3492                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3493                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3494                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3495                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3496                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3497                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3498                 </links>
3499         </class>
3500         <class id="cbs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::bib_source" oils_persist:tablename="config.bib_source" reporter:label="Bib Source">
3501                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
3502                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
3503                         <field name="quality" reporter:datatype="int" />
3504                         <field name="source" reporter:datatype="text"/>
3505                         <field name="transcendant" reporter:datatype="bool"/>
3506                 </fields>
3507                 <links/>
3508         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3509             <actions>
3510                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
3511                 <retrieve/>
3512                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
3513                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
3514             </actions>
3515         </permacrud>
3516         </class>
3517         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
3518                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3519                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3520                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3521                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3522                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3523                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3524                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3525                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3526                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3527                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3528                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3529                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3530                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3531                 </fields>
3532                 <links>
3533                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3534                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3535                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3536                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3537                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3538                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3539                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3540                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3541                 </links>
3542         </class>
3543         <class id="actsce" controller="open-ils.cstore" oils_obj:fieldmapper="actor::stat_cat_entry" oils_persist:tablename="actor.stat_cat_entry" reporter:label="User Stat Cat Entry">
3544                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
3545                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
3546                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
3547                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
3548                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
3549                 </fields>
3550                 <links>
3551                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
3552                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3553                 </links>
3554         </class>
3555         <class id="cubi" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket_item" oils_persist:tablename="container.user_bucket_item" reporter:label="User Bucket Item">
3556                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
3557                         <field name="bucket" reporter:datatype="link"/>
3558                         <field name="id" reporter:datatype="id" />
3559                         <field name="target_user" reporter:datatype="link"/>
3560                         <field name="create_time" reporter:datatype="timestamp" />
3561                         <field name="pos" reporter:datatype="int" />
3562                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3563                 </fields>
3564                 <links>
3565                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
3566                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
3567             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
3568                 </links>
3569         </class>
3570         <class id="cubin" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket_item_note" oils_persist:tablename="container.user_bucket_item_note" reporter:label="User Bucket Item Note">
3571                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
3572                         <field name="id" reporter:datatype="id" />
3573                         <field name="item" reporter:datatype="link"/>
3574                         <field name="note" reporter:datatype="text" />
3575                 </fields>
3576                 <links>
3577                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
3578                 </links>
3579         </class>
3580         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
3581                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3582                         <field name="balance_owed" reporter:datatype="money" />
3583                         <field name="total_owed" reporter:datatype="money" />
3584                         <field name="total_paid" reporter:datatype="money" />
3585                         <field name="usr" reporter:datatype="link"/>
3586                 </fields>
3587                 <links>
3588                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3589                 </links>
3590         </class>
3591         <class id="clfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::lit_form_map" oils_persist:tablename="config.lit_form_map" reporter:label="Literary Form" oils_persist:field_safe="true">
3592                 <fields oils_persist:primary="code" oils_persist:sequence="">
3593                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
3594                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3595                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
3596                 </fields>
3597                 <links/>
3598         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3599             <actions>
3600                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3601                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
3602                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3603                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3604             </actions>
3605         </permacrud>
3606         </class>
3607         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
3608                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3609                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3610                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3611                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3612                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3613                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3614                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3615                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
3616                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3617                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3618                 </fields>
3619                 <links>
3620                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3621                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3622                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3623                 </links>
3624         </class>
3625         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
3626                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3627                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3628                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3629                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3630                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3631                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3632                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3633                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
3634                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3635                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3636                 </fields>
3637                 <links>
3638                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3639                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3640                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3641                 </links>
3642         </class>
3643         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
3644                 <fields oils_persist:primary="id" oils_persist:sequence="">
3645                         <field name="checkin_lib" reporter:datatype="link"/>
3646                         <field name="checkin_staff" reporter:datatype="link"/>
3647                         <field name="checkin_time" reporter:datatype="timestamp"/>
3648                         <field name="circ_lib"  reporter:datatype="org_unit"/>
3649                         <field name="circ_staff" reporter:datatype="link"/>
3650                         <field name="desk_renewal" reporter:datatype="bool"/>
3651                         <field name="due_date" reporter:datatype="timestamp"/>
3652                         <field name="duration" reporter:datatype="interval"/>
3653                         <field name="duration_rule" reporter:datatype="link"/>
3654                         <field name="fine_interval" reporter:datatype="interval"/>
3655                         <field name="id" reporter:datatype="id" />
3656                         <field name="max_fine" reporter:datatype="money" />
3657                         <field name="max_fine_rule" reporter:datatype="link"/>
3658                         <field name="opac_renewal" reporter:datatype="bool"/>
3659                         <field name="phone_renewal" reporter:datatype="bool"/>
3660                         <field name="recurring_fine" reporter:datatype="money" />
3661                         <field name="recurring_fine_rule" reporter:datatype="link"/>
3662                         <field name="renewal_remaining" reporter:datatype="int" />
3663                         <field name="stop_fines" reporter:datatype="text"/>
3664                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
3665                         <field name="target_copy" reporter:datatype="link"/>
3666                         <field name="usr" reporter:datatype="link"/>
3667                         <field name="xact_finish" reporter:datatype="timestamp" />
3668                         <field name="xact_start" reporter:datatype="timestamp" />
3669                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3670                 </fields>
3671                 <links>
3672                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3673                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3674                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3675                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3676                 </links>
3677         </class>
3678         <class id="msfe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::subject_field_entry" oils_persist:tablename="metabib.subject_field_entry" reporter:label="Subject Field Entry">
3679                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
3680                         <field name="field" reporter:datatype="link"/>
3681                         <field name="id" reporter:datatype="id" />
3682                         <field name="source" reporter:datatype="link"/>
3683                         <field name="value" reporter:datatype="text"/>
3684                 </fields>
3685                 <links>
3686                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3687                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3688                 </links>
3689         </class>
3690         <class id="crrf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::recurring_fine" oils_persist:tablename="config.rule_recurring_fine" reporter:label="Recurring Fine Rule">
3691                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
3692                         <field name="high" reporter:datatype="money" />
3693                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3694                         <field name="low" reporter:datatype="money" />
3695                         <field name="name" reporter:datatype="text"/>
3696                         <field name="normal" reporter:datatype="money" />
3697                         <field name="recurrence_interval" reporter:datatype="interval"/>
3698                 </fields>
3699                 <links/>
3700         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3701             <actions>
3702                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
3703                 <retrieve/>
3704                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
3705                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
3706             </actions>
3707         </permacrud>
3708         </class>
3709         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
3710                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3711                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3712                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3713                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3714                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
3715                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
3716                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3717                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3718                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3719                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
3720                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3721                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3722                 </fields>
3723                 <links>
3724                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3725                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3726                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3727                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3728                 </links>
3729         </class>
3730         <class id="acp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy" oils_persist:tablename="asset.copy" reporter:core="true" reporter:label="Item">
3731                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
3732                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3733                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
3734                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
3735                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3736                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
3737                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
3738                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3739                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
3740                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
3741                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
3742                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3743                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3744                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3745                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
3746                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3747                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
3748                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
3749                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
3750                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3751                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3752                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
3753                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
3754                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
3755                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
3756                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
3757                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
3758                         <field reporter:label="Price" name="price" reporter:datatype="money" />
3759                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
3760                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
3761                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
3762                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
3763                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
3764                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3765                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3766                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3767                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
3768                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3769                 </fields>
3770                 <links>
3771                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
3772                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3773                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3774                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3775                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3776                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
3777                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3778                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
3779                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
3780                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
3781                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
3782                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
3783                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
3784                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
3785                 </links>
3786         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3787             <actions>
3788                 <create permission="CREATE_COPY">
3789                     <context link="call_number" field="owning_lib"/>
3790                 </create>
3791                 <retrieve/>
3792                 <update permission="UPDATE_COPY">
3793                     <context link="call_number" field="owning_lib"/>
3794                 </update>
3795                 <delete permission="DELETE_COPY">
3796                     <context link="call_number" field="owning_lib"/>
3797                 </delete>
3798             </actions>
3799         </permacrud>
3800         </class>
3801         <class id="crahp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::age_hold_protect" oils_persist:tablename="config.rule_age_hold_protect" reporter:label="Age Hold Protection Rule">
3802                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
3803                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
3804                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3805                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
3806                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
3807                 </fields>
3808                 <links/>
3809         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3810             <actions>
3811                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
3812                 <retrieve/>
3813                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
3814                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
3815             </actions>
3816         </permacrud>
3817         </class>
3818         <class id="crmf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::max_fine" oils_persist:tablename="config.rule_max_fine" reporter:label="Max Fine Rule">
3819                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
3820                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
3821                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3822                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
3823                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
3824                 </fields>
3825                 <links/>
3826         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3827             <actions>
3828                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
3829                 <retrieve/>
3830                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
3831                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
3832             </actions>
3833         </permacrud>
3834         </class>
3835         <class id="pgt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::grp_tree" oils_persist:tablename="permission.grp_tree" reporter:label="Permission Group">
3836                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
3837                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
3838                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3839                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3840                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3841                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
3842                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
3843                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
3844                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
3845                 </fields>
3846                 <links>
3847                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
3848                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
3849                 </links>
3850         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3851             <actions>
3852                 <create permission="CREATE_PERM" global_required="true"/>
3853                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
3854                 <update permission="UPDATE_PERM" global_required="true"/>
3855                 <delete permission="DELETE_PERM" global_required="true"/>
3856             </actions>
3857         </permacrud>
3858         </class>
3859         <class id="asva" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_answer" oils_persist:tablename="action.survey_answer" reporter:label="Survey Answer">
3860                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
3861                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
3862                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
3863                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
3864                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
3865                 </fields>
3866                 <links>
3867                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
3868                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
3869                 </links>
3870         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3871             <actions>
3872                 <create permission="ADMIN_SURVEY">
3873                     <context link="question" jump="survey" field="owner"/>
3874                 </create>
3875                 <retrieve/>
3876                 <update permission="ADMIN_SURVEY">
3877                     <context link="question" jump="survey" field="owner"/>
3878                 </update>
3879                 <delete permission="ADMIN_SURVEY">
3880                     <context link="question" jump="survey" field="owner"/>
3881                 </delete>
3882             </actions>
3883         </permacrud>
3884         </class>
3885         <class id="ancc" controller="open-ils.cstore" oils_obj:fieldmapper="action::non_cataloged_circulation" oils_persist:tablename="action.non_cataloged_circulation" reporter:core="true" reporter:label="Non-cataloged Circulation">
3886                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
3887                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3888                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
3889                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
3890                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
3891                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
3892                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
3893                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
3894                 </fields>
3895                 <links>
3896                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
3897                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3898                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
3899                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3900                 </links>
3901         </class>
3902         <class id="moucs" controller="open-ils.cstore" oils_obj:fieldmapper="money::open_user_circulation_summary" oils_persist:tablename="money.open_usr_circulation_summary" reporter:label="Open User Circulation Summary">
3903                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3904                         <field name="balance_owed" reporter:datatype="money" />
3905                         <field name="total_owed" reporter:datatype="money" />
3906                         <field name="total_paid" reporter:datatype="money" />
3907                         <field name="usr" reporter:datatype="link"/>
3908                 </fields>
3909                 <links>
3910                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3911                 </links>
3912         </class>
3913         <class id="aufh" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_list" oils_persist:tablename="action.unfulfilled_hold_list" reporter:label="Unfulfilled Hold Targets">
3914                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
3915                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
3916                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
3917                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
3918                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
3919                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3920                 </fields>
3921                 <links>
3922                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3923                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
3924                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3925                 </links>
3926         </class>
3927         <class id="mtfe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::title_field_entry" oils_persist:tablename="metabib.title_field_entry" reporter:label="Title Field Entry">
3928                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
3929                         <field name="field" reporter:datatype="link"/>
3930                         <field name="id" reporter:datatype="id" />
3931                         <field name="source" reporter:datatype="link"/>
3932                         <field name="value" reporter:datatype="text"/>
3933                 </fields>
3934                 <links>
3935                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3936                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3937                 </links>
3938         </class>
3939         <class id="actscecm" controller="open-ils.cstore" oils_obj:fieldmapper="actor::stat_cat_entry_user_map" oils_persist:tablename="actor.stat_cat_entry_usr_map"  reporter:label="User Statistical Category Entry">
3940                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
3941                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
3942                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
3943                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
3944                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
3945                 </fields>
3946                 <links>
3947                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
3948                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
3949                 </links>
3950         </class>
3951         <class id="pgpm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::grp_perm_map" oils_persist:tablename="permission.grp_perm_map" reporter:label="Group Permission Map">
3952                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
3953                         <field name="depth" reporter:datatype="int" />
3954                         <field name="grantable" reporter:datatype="bool"/>
3955                         <field name="grp" reporter:datatype="link"/>
3956                         <field name="id" reporter:datatype="id" />
3957                         <field name="perm" reporter:datatype="link"/>
3958                 </fields>
3959                 <links>
3960                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3961                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
3962                 </links>
3963         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3964             <actions>
3965                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
3966                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
3967                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
3968                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
3969             </actions>
3970         </permacrud>
3971         </class>
3972         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
3973                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
3974                         <field name="items" oils_persist:virtual="true" />
3975                         <field name="btype" reporter:datatype="text"/>
3976                         <field name="id" reporter:datatype="id" />
3977                         <field name="name" reporter:datatype="text"/>
3978                         <field name="owner" reporter:datatype="link"/>
3979                         <field name="pub" reporter:datatype="bool"/>
3980                         <field name="create_time" reporter:datatype="timestamp" />
3981                 </fields>
3982                 <links>
3983                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3984                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
3985                 </links>
3986         </class>
3987         <class id="ccbn" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_note" oils_persist:tablename="container.copy_bucket_note" reporter:label="Copy Bucket Note">
3988                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
3989                         <field name="id" reporter:datatype="id" />
3990                         <field name="bucket" reporter:datatype="link"/>
3991                         <field name="note" reporter:datatype="text" />
3992                 </fields>
3993                 <links>
3994                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
3995                 </links>
3996         </class>
3997         <class id="puwoum" controller="open-ils.cstore" oils_obj:fieldmapper="permission::usr_work_ou_map" oils_persist:tablename="permission.usr_work_ou_map" reporter:label="User Work Org Unit Map">
3998                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
3999                         <field name="id" reporter:datatype="int" />
4000                         <field name="usr" reporter:datatype="link"/>
4001                         <field name="work_ou" reporter:datatype="link"/>
4002                 </fields>
4003                 <links>
4004                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4005                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
4006                 </links>
4007         </class>
4008         <class id="pupm" controller="open-ils.cstore" oils_obj:fieldmapper="permission::usr_perm_map" oils_persist:tablename="permission.usr_perm_map" reporter:label="User Permission Map">
4009                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
4010                         <field name="depth" reporter:datatype="int"/>
4011                         <field name="grantable" reporter:datatype="bool"/>
4012                         <field name="id" reporter:datatype="id" />
4013                         <field name="perm" reporter:datatype="link"/>
4014                         <field name="usr" reporter:datatype="link"/>
4015                 </fields>
4016                 <links>
4017                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4018                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
4019                 </links>
4020         </class>
4021         <class id="puopm" controller="open-ils.cstore" oils_obj:fieldmapper="permission::usr_object_perm_map" oils_persist:tablename="permission.usr_object_perm_map" reporter:label="User Object Permission Map">
4022                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
4023                         <field name="object_id" reporter:datatype="text"/>
4024                         <field name="grantable" reporter:datatype="bool"/>
4025                         <field name="id" reporter:datatype="id" />
4026                         <field name="perm" reporter:datatype="link"/>
4027                         <field name="usr" reporter:datatype="link"/>
4028                         <field name="object_type" reporter:datatype="text"/>
4029                 </fields>
4030                 <links>
4031                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4032                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
4033                 </links>
4034         </class>
4035         <class id="mp" controller="open-ils.cstore" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:core="true" reporter:label="Payments: All">
4036                 <fields oils_persist:primary="id" oils_persist:sequence="">
4037                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4038                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4039                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4040                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4041                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4042                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4043                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4044                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4045                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4046                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4047                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4048                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4049                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4050                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4051                 </fields>
4052                 <links>
4053                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
4054                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
4055                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
4056                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
4057                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
4058                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
4059                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
4060                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4061                 </links>
4062         </class>
4063         <class id="mbp" controller="open-ils.cstore" oils_obj:fieldmapper="money::bnm_payment" oils_persist:tablename="money.bnm_payment_view" reporter:core="true" reporter:label="Payments: Brick-and-mortar">
4064                 <fields oils_persist:primary="id" oils_persist:sequence="">
4065                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4066                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4067                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4068                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4069                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4070                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4071                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4072                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4073                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4074                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4075                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4076                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4077                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4078                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4079                 </fields>
4080                 <links>
4081                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
4082                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
4083                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
4084                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
4085                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
4086                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
4087                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
4088                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4089                 </links>
4090         </class>
4091         <class id="mndp" controller="open-ils.reporter" oils_obj:fieldmapper="money::non_drawer_payment" oils_persist:tablename="money.non_drawer_payment_view" reporter:core="true" reporter:label="Payments: Non-drawer Staff">
4092                 <fields oils_persist:primary="id" oils_persist:sequence="">
4093                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4094                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4095                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4096                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4097                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4098                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4099                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4100                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4101                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4102                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4103                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4104                 </fields>
4105                 <links>
4106                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
4107                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
4108                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
4109                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
4110                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4111                 </links>
4112         </class>
4113         <class id="mdp" controller="open-ils.cstore" oils_obj:fieldmapper="money::desk_payment" oils_persist:tablename="money.desk_payment_view" reporter:core="true" reporter:label="Payments: Desk">
4114                 <fields oils_persist:primary="id" oils_persist:sequence="">
4115                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4116                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4117                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4118                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4119                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4120                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4121                         <field reporter:label="Accepting User" name="accepting_usr" />
4122                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
4123                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4124                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4125                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4126                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4127                 </fields>
4128                 <links>
4129                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
4130                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
4131                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
4132                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4133                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4134                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4135                 </links>
4136         </class>
4137         <class id="cbrebi" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket_item" oils_persist:tablename="container.biblio_record_entry_bucket_item" reporter:label="Biblio Record Entry Bucket Item">
4138                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
4139                         <field name="bucket" reporter:datatype="link"/>
4140                         <field name="id" reporter:datatype="id" />
4141                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
4142                         <field name="create_time" reporter:datatype="timestamp" />
4143                         <field name="pos" reporter:datatype="int" />
4144                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4145                 </fields>
4146                 <links>
4147                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
4148                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4149             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
4150                 </links>
4151         </class>
4152         <class id="cbrebin" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket_item_note" oils_persist:tablename="container.biblio_record_entry_bucket_item_note" reporter:label="Biblio Record Entry Bucket Item Note">
4153                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
4154                         <field name="id" reporter:datatype="id" />
4155                         <field name="item" reporter:datatype="link"/>
4156                         <field name="note" reporter:datatype="text" />
4157                 </fields>
4158                 <links>
4159                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
4160                 </links>
4161         </class>
4162         <class id="asce" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat_entry" oils_persist:tablename="asset.stat_cat_entry" reporter:label="Item Stat Cat Entry">
4163                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
4164                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
4165                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
4166                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
4167                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
4168                 </fields>
4169                 <links>
4170                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4171                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4172                 </links>
4173         </class>
4174
4175         <class id="ahrcc" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="action::hold_request_cancel_cause" oils_persist:tablename="action.hold_request_cancel_cause" oils_persist:restrict_primary="100" reporter:label="Hold Request Cancel Cause">
4176                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
4177                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
4178                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
4179                 </fields>
4180                 <links/>
4181         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4182             <actions>
4183                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4184                 <retrieve/>
4185                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4186                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4187             </actions>
4188         </permacrud>
4189         </class>
4190
4191
4192         <class id="artc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::reservation_transit_copy" oils_persist:tablename="action.reservation_transit_copy" reporter:core="true" reporter:label="Reservation Transit">
4193                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
4194                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
4195                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
4196                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
4197                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
4198                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
4199                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
4200                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
4201                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
4202                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
4203                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
4204                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
4205                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
4206                 </fields>
4207                 <links>
4208                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
4209                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
4210                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
4211                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
4212                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
4213                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
4214                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4215                 </links>
4216         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4217             <actions>
4218                 <create permission="TRANSIT_COPY">
4219                     <context link="target_copy" field="owner"/>
4220                 </create>
4221                 <retrieve/>
4222                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
4223                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
4224             </actions>
4225         </permacrud>
4226         </class>
4227         <class id="ahtc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_transit_copy" oils_persist:tablename="action.hold_transit_copy" reporter:core="true" reporter:label="Hold Transit">
4228                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
4229                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
4230                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
4231                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
4232                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
4233                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
4234                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
4235                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
4236                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
4237                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
4238                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
4239                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
4240                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
4241                 </fields>
4242                 <links>
4243                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
4244                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4245                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
4246                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
4247                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
4248                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
4249                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4250                 </links>
4251         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4252             <actions>
4253                 <create permission="TRANSIT_COPY" context_field="owner">
4254                     <context link="target_copy" field="circ_lib"/>
4255                 </create>
4256                 <retrieve/>
4257                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
4258                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
4259             </actions>
4260         </permacrud>
4261         </class>
4262         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
4263                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
4264                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4265                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
4266                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
4267                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
4268                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4269                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
4270                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4271                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
4272                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
4273                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
4274                 </fields>
4275                 <links>
4276                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4277                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
4278                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
4279                 </links>
4280         </class>
4281         <class id="pugm" controller="open-ils.cstore" oils_obj:fieldmapper="permission::usr_grp_map" oils_persist:tablename="permission.usr_grp_map" reporter:label="User Group Map">
4282                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
4283                         <field name="grp" />
4284                         <field name="id" reporter:datatype="id" />
4285                         <field name="usr" />
4286                 </fields>
4287                 <links>
4288                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4289                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4290                 </links>
4291         </class>
4292         <class id="i18n" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::i18n_core" oils_persist:tablename="config.i18n_core" oils_persist:field_safe="true" reporter:label="i18n Core">
4293                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
4294                         <field name="id" reporter:datatype="id" />
4295                         <field name="fq_field" reporter:datatype="text"/>
4296                         <field name="identity_value" reporter:datatype="text"/>
4297                         <field name="translation" reporter:datatype="text"/>
4298                         <field name="string" reporter:datatype="text"/>
4299                 </fields>
4300                 <links>
4301                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
4302                 </links>
4303         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4304             <actions>
4305                 <create permission="CREATE_TRANSLATION" global_required="true"/>
4306                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
4307                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
4308                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
4309             </actions>
4310         </permacrud>
4311         </class>
4312         <class id="fdoc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::idl_field_doc" oils_persist:tablename="config.idl_field_doc" oils_persist:field_safe="true" reporter:label="IDL Field Doc">
4313                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
4314                         <field name="id" reporter:datatype="id" />
4315                         <field name="fm_class" reporter:datatype="text"/>
4316                         <field name="field" reporter:datatype="text"/>
4317                         <field name="owner" reporter:datatype="org_unit"/>
4318                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
4319                 </fields>
4320                 <links>
4321                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4322                 </links>
4323         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4324             <actions>
4325                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
4326                 <retrieve/>
4327                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
4328                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
4329             </actions>
4330         </permacrud>
4331         </class>
4332         <class id="i18n_l" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::i18n_locale" oils_persist:tablename="config.i18n_locale" oils_persist:field_safe="true" reporter:label="Locale">
4333                 <fields oils_persist:primary="code">
4334                         <field name="code" reporter:datatype="id" />
4335                         <field name="marc_code" reporter:datatype="text"/>
4336                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4337                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4338                 </fields>
4339                 <links/>
4340         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4341             <actions>
4342                 <create permission="CREATE_LOCALE" global_required="true"/>
4343                 <retrieve permission="CREATE_LOCALE UPDATE_LOCALE DELETE_LOCALE" global_required="true"/>
4344                 <update permission="UPDATE_LOCALE" global_required="true"/>
4345                 <delete permission="DELETE_LOCALE" global_required="true"/>
4346             </actions>
4347         </permacrud>
4348         </class>
4349         <class id="cbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::billing_type" oils_persist:tablename="config.billing_type" oils_persist:restrict_primary="100" reporter:label="Billing Type">
4350                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
4351                         <field name="id" reporter:datatype="id" reporter:label="ID" />
4352                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
4353                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
4354             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
4355                 </fields>
4356                 <links>
4357                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4358                 </links>
4359         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4360             <actions>
4361                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
4362                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
4363                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
4364                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
4365             </actions>
4366         </permacrud>
4367         </class>
4368
4369         <class id="aurt" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::user_request_type" oils_persist:tablename="acq.user_request_type" reporter:label="User Purchase Request Type">
4370                 <fields oils_persist:primary="id">
4371                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
4372                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
4373                 </fields>
4374                 <links/>
4375         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4376             <actions>
4377                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
4378                 <retrieve/>
4379                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
4380                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
4381             </actions>
4382         </permacrud>
4383         </class>
4384
4385         <class id="aur" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::user_request" oils_persist:tablename="acq.user_request" reporter:label="User Purchase Request">
4386                 <fields oils_persist:primary="id">
4387                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
4388                         <field reporter:label="User" name="usr" reporter:datatype="link" />
4389                         <field reporter:label="Request Type" name="request_type" reporter:datatype="link" />
4390                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
4391                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
4392                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
4393                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
4394                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
4395                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
4396                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
4397                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
4398                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
4399                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
4400                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
4401                         <field reporter:label="Title" name="title" reporter:datatype="text" />
4402                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
4403                         <field reporter:label="Author" name="author" reporter:datatype="text" />
4404                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
4405                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
4406                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
4407                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
4408                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
4409                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
4410                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
4411                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
4412                 </fields>
4413                 <links>
4414                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4415                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4416                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
4417                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
4418                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
4419                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
4420                 </links>
4421         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4422             <actions>
4423                 <create permission="user_request.create">
4424                     <context link="usr" field="home_ou"/>
4425                                 </create>
4426                 <retrieve permission="user_request.view">
4427                     <context link="usr" field="home_ou"/>
4428                                 </retrieve>
4429                 <update permission="user_request.update">
4430                     <context link="usr" field="home_ou"/>
4431                                 </update>
4432                 <delete permission="user_request.delete">
4433                     <context link="usr" field="home_ou"/>
4434                                 </delete>
4435             </actions>
4436         </permacrud>
4437         </class>
4438
4439         <class id="acqct" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::currency_type" oils_persist:tablename="acq.currency_type" reporter:label="Currency Type">
4440                 <fields oils_persist:primary="code">
4441                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
4442                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
4443                 </fields>
4444                 <links/>
4445         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4446             <actions>
4447                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4448                 <retrieve/>
4449                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4450                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4451             </actions>
4452         </permacrud>
4453         </class>
4454
4455         <class id="acqexr" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::exchange_rate" oils_persist:tablename="acq.exchange_rate" reporter:label="Exchange Rate">
4456                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
4457                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
4458                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
4459                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
4460                         <field reporter:label="Ratio" name="ratio" />
4461                 </fields>
4462                 <links>
4463                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
4464                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
4465                 </links>
4466                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4467                         <actions>
4468                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4469                                 <retrieve/>
4470                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4471                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4472                         </actions>
4473                 </permacrud>
4474         </class>
4475
4476         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
4477                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
4478                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
4479                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
4480                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
4481                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
4482                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4483                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
4484                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
4485                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
4486                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
4487                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
4488                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
4489                         <field reporter:label="URL" name="url" reporter:datatype="text" />
4490                         <field reporter:label="Email" name="email" reporter:datatype="text" />
4491                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
4492                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
4493                         <field reporter:label="Default Claim Interval" name="default_claim_interval" reporter:datatype="interval" />
4494                 </fields>
4495                 <links>
4496                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4497                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4498             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
4499             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
4500                 </links>
4501         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4502             <actions>
4503                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
4504                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
4505                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
4506                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
4507             </actions>
4508         </permacrud>
4509         </class>
4510
4511         <class id="acqpron" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::provider_note" oils_persist:tablename="acq.provider_note" reporter:label="Provider Note">
4512                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
4513                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
4514                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
4515                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
4516                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
4517                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
4518                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
4519                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
4520                 </fields>
4521                 <links>
4522                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4523                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4524                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4525                 </links>
4526         </class>
4527
4528         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
4529                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
4530                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
4531                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
4532                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
4533                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
4534                         <field reporter:label="Receive Date/Time" name="recv_date" reporter:datatype="timestamp" />
4535                         <field reporter:label="Receive Method" name="receive_method" reporter:datatype="link" />
4536                         <field reporter:label="Invoice Type" name="invoice_type" reporter:datatype="text" />
4537                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
4538                 </fields>
4539                 <links>
4540                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
4541                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4542                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
4543                         <link field="receive_method" reltype="has_a" key="id" map="" class="acqim"/>
4544                 </links>
4545         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4546             <actions>
4547                 <create   permission="ADMIN_INVOICE" context_field="receiver"/>
4548                 <retrieve permission="ADMIN_INVOICE" context_field="receiver"/>
4549                 <update   permission="ADMIN_INVOICE" context_field="receiver"/>
4550                 <delete   permission="ADMIN_INVOICE" context_field="receiver"/>
4551             </actions>
4552         </permacrud>
4553         </class>
4554
4555         <class id="acqie" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_entry" oils_persist:tablename="acq.invoice_entry" reporter:label="Invoice Entry">
4556                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
4557                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4558                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
4559                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
4560                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
4561                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
4562                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
4563                         <field reporter:label="Note" name="note" reporter:datatype="text" />
4564                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
4565                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
4566                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
4567                 </fields>
4568                 <links>
4569                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
4570                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
4571                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
4572                 </links>
4573         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4574             <actions>
4575                 <create   permission="ADMIN_INVOICE">
4576                                         <context link="invoice" field="receiver"/>
4577                                 </create>
4578                 <retrieve permission="ADMIN_INVOICE">
4579                                         <context link="invoice" field="receiver"/>
4580                                 </retrieve>
4581                 <update   permission="ADMIN_INVOICE">
4582                                         <context link="invoice" field="receiver"/>
4583                                 </update>
4584                                 <delete   permission="ADMIN_INVOICE">
4585                                         <context link="invoice" field="receiver"/>
4586                                 </delete>
4587             </actions>
4588         </permacrud>
4589         </class>
4590
4591         <class id="acqii" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_item" oils_persist:tablename="acq.invoice_item" reporter:label="Non-bibliographic Invoice Item">
4592                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
4593                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4594                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
4595                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
4596                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
4597                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
4598                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
4599                         <field reporter:label="Author" name="author" reporter:datatype="text" />
4600                         <field reporter:label="Note" name="note" reporter:datatype="text" />
4601                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
4602                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
4603                 </fields>
4604                 <links>
4605                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
4606                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
4607                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
4608                 </links>
4609         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4610             <actions>
4611                 <create   permission="ADMIN_INVOICE">
4612                                         <context link="invoice" field="receiver"/>
4613                                 </create>
4614                 <retrieve permission="ADMIN_INVOICE">
4615                                         <context link="invoice" field="receiver"/>
4616                                 </retrieve>
4617                 <update   permission="ADMIN_INVOICE">
4618                                         <context link="invoice" field="receiver"/>
4619                                 </update>
4620                                 <delete   permission="ADMIN_INVOICE">
4621                                         <context link="invoice" field="receiver"/>
4622                                 </delete>
4623             </actions>
4624         </permacrud>
4625         </class>
4626
4627         <class id="acqpa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider_address" oils_persist:tablename="acq.provider_address" reporter:label="Provider Address">
4628                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
4629                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
4630                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4631                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4632                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4633                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4634                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
4635                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
4636                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4637                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
4638                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
4639                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
4640                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
4641                 </fields>
4642                 <links>
4643                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4644                 </links>
4645         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4646             <actions>
4647                 <create permission="ADMIN_PROVIDER">
4648                     <context link="provider" field="owner"/>
4649                 </create>
4650                 <retrieve permission="ADMIN_PROVIDER">
4651                     <context link="provider" field="owner"/>
4652                 </retrieve>
4653                 <update permission="ADMIN_PROVIDER">
4654                     <context link="provider" field="owner"/>
4655                 </update>
4656                 <delete permission="ADMIN_PROVIDER">
4657                     <context link="provider" field="owner"/>
4658                 </delete>
4659             </actions>
4660         </permacrud>
4661         </class>
4662
4663         <class id="acqpc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider_contact" oils_persist:tablename="acq.provider_contact" reporter:label="Provider Contact">
4664                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
4665                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4666                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
4667                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4668                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
4669                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
4670                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
4671         </fields>
4672                 <links>
4673                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4674                 </links>
4675         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4676             <actions>
4677                 <create permission="ADMIN_PROVIDER">
4678                     <context link="provider" field="owner"/>
4679                 </create>
4680                 <retrieve permission="ADMIN_PROVIDER">
4681                     <context link="provider" field="owner"/>
4682                 </retrieve>
4683                 <update permission="ADMIN_PROVIDER">
4684                     <context link="provider" field="owner"/>
4685                 </update>
4686                 <delete permission="ADMIN_PROVIDER">
4687                     <context link="provider" field="owner"/>
4688                 </delete>
4689             </actions>
4690         </permacrud>
4691     </class>
4692         <class id="acqpca" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider_contact_address" oils_persist:tablename="acq.provider_contact_address" reporter:label="Provider Contact Address">
4693                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
4694                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
4695                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4696                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4697                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4698                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
4699                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4700                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4701                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4702                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4703                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
4704                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
4705                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
4706                 </fields>
4707                 <links>
4708                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
4709                 </links>
4710         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4711             <actions>
4712                 <create permission="ADMIN_PROVIDER">
4713                     <context link="contact" jump='provider' field="owner"/>
4714                 </create>
4715                 <retrieve permission="ADMIN_PROVIDER">
4716                     <context link="contact" jump='provider' field="owner"/>
4717                 </retrieve>
4718                 <update permission="ADMIN_PROVIDER">
4719                     <context link="contact" jump='provider' field="owner"/>
4720                 </update>
4721                 <delete permission="ADMIN_PROVIDER">
4722                     <context link="contact" jump='provider' field="owner"/>
4723                 </delete>
4724             </actions>
4725         </permacrud>
4726         </class>
4727
4728         <class id="acqftr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
4729                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
4730                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
4731                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
4732                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
4733                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
4734                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
4735                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
4736                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
4737                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4738                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
4739                 </fields>
4740                 <links>
4741                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
4742                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
4743                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
4744                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
4745                 </links>
4746                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4747                 </permacrud>
4748         </class>
4749
4750         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
4751                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
4752                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='id'/>
4753                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
4754                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
4755                 </fields>
4756                 <links>
4757             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
4758                 </links>
4759                 <!--
4760                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
4761                         But here's what it should look like if we ever do use pcrud.
4762                 -->
4763                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4764                         <actions>
4765                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4766                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4767                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4768                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4769                         </actions>
4770                 </permacrud>
4771         </class>
4772
4773         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
4774                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
4775                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='id'/>
4776                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
4777                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
4778                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
4779                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
4780                 </fields>
4781                 <links>
4782                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
4783                 </links>
4784                 <!--
4785                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
4786                         But here's what it should look like if we ever do use pcrud.
4787                 -->
4788                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4789                         <actions>
4790                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4791                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4792                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4793                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4794                         </actions>
4795                 </permacrud>
4796         </class>
4797
4798         <class id="acqfs" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::funding_source" oils_persist:tablename="acq.funding_source" reporter:label="Funding Source">
4799                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
4800                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
4801                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
4802                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
4803                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
4804                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4805                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
4806                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
4807                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
4808                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
4809                 </fields>
4810                 <links>
4811                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4812                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4813             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
4814             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
4815                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
4816                 </links>
4817         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4818             <actions>
4819                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
4820                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
4821                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
4822                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
4823             </actions>
4824         </permacrud>
4825         </class>
4826
4827         <class id="acqfscred" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::funding_source_credit" oils_persist:tablename="acq.funding_source_credit" reporter:label="Credit to Funding Source">
4828                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
4829                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
4830                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
4831                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4832                         <field reporter:label="Note" name="note" reporter:datatype="text" />
4833                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
4834                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
4835                 </fields>
4836                 <links>
4837                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4838                 </links>
4839         </class>
4840
4841         <class id="acqofscred" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::ordered_funding_source_credit" oils_persist:tablename="acq.ordered_funding_source_credit" reporter:label="Ordered Funding Source Credit">
4842                 <fields oils_persist:primary="id">
4843                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
4844                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
4845                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
4846                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
4847                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
4848                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4849                 </fields>
4850                 <links>
4851                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4852                 </links>
4853                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4854                 </permacrud>
4855         </class>
4856
4857         <class id="acqfdeb" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_debit" oils_persist:tablename="acq.fund_debit" reporter:label="Debit From Fund">
4858                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
4859                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
4860                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4861                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
4862                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
4863                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4864                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="text" />
4865                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
4866                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
4867                 </fields>
4868                 <links>
4869                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4870                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4871                 </links>
4872         </class>
4873
4874         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
4875                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
4876                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
4877                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
4878                         <field reporter:label="Name" name="name" reporter:datatype="text" />
4879                         <field reporter:label="Year" name="year" reporter:datatype="int" />
4880                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
4881                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4882                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
4883                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
4884                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
4885                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
4886                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
4887                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
4888                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
4889                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
4890                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
4891                 </fields>
4892                 <links>
4893                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4894                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4895             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
4896             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
4897             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
4898                 </links>
4899         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4900             <actions>
4901                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
4902                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
4903                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
4904                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
4905             </actions>
4906         </permacrud>
4907         </class>
4908
4909         <class id="acqfat" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_allocation_total" oils_persist:readonly="true" oils_persist:tablename="acq.fund_allocation_total" reporter:label="Fund Allocation Total">
4910                 <fields oils_persist:primary="fund">
4911                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4912                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
4913                 </fields>
4914                 <links>
4915                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4916                 </links>
4917         </class>
4918
4919         <class id="acqfdt" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_debit_total" oils_persist:readonly="true" oils_persist:tablename="acq.fund_debit_total" reporter:label="Total Debit from Fund">
4920                 <fields oils_persist:primary="fund">
4921                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4922                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
4923                 </fields>
4924                 <links>
4925                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4926                 </links>
4927         </class>
4928
4929         <class id="acqfet" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_encumbrance_total" oils_persist:readonly="true" oils_persist:tablename="acq.fund_encumbrance_total" reporter:label="Total Fund Encumbrance">
4930                 <fields oils_persist:primary="fund">
4931                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4932                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
4933                 </fields>
4934                 <links>
4935                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4936                 </links>
4937         </class>
4938
4939         <class id="acqfst" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_spent_total" oils_persist:readonly="true" oils_persist:tablename="acq.fund_spent_total" reporter:label="Total Spent from Fund">
4940                 <fields oils_persist:primary="fund">
4941                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4942                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
4943                 </fields>
4944                 <links>
4945                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4946                 </links>
4947         </class>
4948
4949         <class id="acqfcb" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_combined_balance" oils_persist:readonly="true" oils_persist:tablename="acq.fund_combined_balance" reporter:label="Fund Combined Balance">
4950                 <fields oils_persist:primary="fund">
4951                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4952                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
4953                 </fields>
4954                 <links>
4955                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4956                 </links>
4957         </class>
4958
4959    <class id="acqafat" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::all_fund_allocation_total" oils_persist:readonly="true" oils_persist:tablename="acq.all_fund_allocation_total" reporter:label="All Fund Allocation Total">
4960         <fields oils_persist:primary="fund">
4961             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4962             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
4963         </fields>
4964         <links>
4965             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4966         </links>
4967     </class>
4968
4969    <class id="acqafet" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::all_fund_encumbrance_total" oils_persist:readonly="true" oils_persist:tablename="acq.all_fund_encumbrance_total" reporter:label="All Fund Encumbrance Total">
4970         <fields oils_persist:primary="fund">
4971             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4972             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
4973         </fields>
4974         <links>
4975             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4976         </links>
4977     </class>
4978
4979    <class id="acqafst" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::all_fund_spent_total" oils_persist:readonly="true" oils_persist:tablename="acq.all_fund_spent_total" reporter:label="All Fund Spent Total">
4980         <fields oils_persist:primary="fund">
4981             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4982             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
4983         </fields>
4984         <links>
4985             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4986         </links>
4987     </class>
4988
4989    <class id="acqafsb" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::all_fund_spent_balance" oils_persist:readonly="true" oils_persist:tablename="acq.all_fund_spent_balance" reporter:label="All Fund Spent Balance">
4990         <fields oils_persist:primary="fund">
4991             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4992             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
4993         </fields>
4994         <links>
4995             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4996         </links>
4997     </class>
4998
4999    <class id="acqafcb" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::all_fund_combined_balance" oils_persist:readonly="true" oils_persist:tablename="acq.all_fund_combined_balance" reporter:label="All Fund Combined Total">
5000         <fields oils_persist:primary="fund">
5001             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5002             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
5003         </fields>
5004         <links>
5005             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5006         </links>
5007     </class>
5008
5009         <class id="acqfsrcct" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::funding_source_credit_total" oils_persist:readonly="true" oils_persist:tablename="acq.funding_source_credit_total" reporter:label="Total Credit to Funding Source">
5010                 <fields oils_persist:primary="funding_source">
5011                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5012                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
5013                 </fields>
5014                 <links>
5015                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5016                 </links>
5017         </class>
5018
5019         <class id="acqfsrcat" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::funding_source_allocation_total" oils_persist:readonly="true" oils_persist:tablename="acq.funding_source_allocation_total" reporter:label="Total Allocation to Funding Source">
5020                 <fields oils_persist:primary="funding_source">
5021                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5022                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
5023                 </fields>
5024                 <links>
5025                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5026                 </links>
5027         </class>
5028
5029         <class id="acqfsrcb" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::funding_source_balance" oils_persist:readonly="true" oils_persist:tablename="acq.funding_source_balance" reporter:label="Funding Source Balance">
5030                 <fields oils_persist:primary="funding_source">
5031                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5032                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
5033                 </fields>
5034                 <links>
5035                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5036                 </links>
5037         </class>
5038
5039         <class id="acqfsb" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_spent_balance" oils_persist:readonly="true" oils_persist:tablename="acq.fund_spent_balance" reporter:label="Fund Spent Balance">
5040                 <fields oils_persist:primary="fund">
5041                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5042                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
5043                 </fields>
5044                 <links>
5045                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5046                 </links>
5047         </class>
5048
5049         <class id="acqfa" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_allocation" oils_persist:tablename="acq.fund_allocation" reporter:label="Fund Allocation">
5050                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
5051                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
5052                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
5053                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5054                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5055                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
5056                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5057                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
5058                 </fields>
5059                 <links>
5060                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
5061                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5062                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5063                 </links>
5064         </class>
5065
5066     <class id="acqfap" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_allocation_percent" oils_persist:tablename="acq.fund_allocation_percent" reporter:label="Fund Allocation Percent">
5067         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
5068             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
5069             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5070             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
5071             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
5072             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
5073             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
5074             <field reporter:label="Note" name="note" reporter:datatype="text" />
5075             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
5076         </fields>
5077         <links>
5078             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
5079             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5080             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5081         </links>
5082                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5083                         <actions>
5084                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5085                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5086                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5087                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5088                         </actions>
5089                 </permacrud>
5090     </class>
5091
5092         <class id="acqpl" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Pick List">
5093                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
5094                         <field reporter:label="Picklist ID" name="id" reporter:datatype="id" />
5095                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
5096                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link" />
5097                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
5098                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5099                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5100                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
5101                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
5102                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5103                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5104                 </fields>
5105                 <links>
5106                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5107                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5108                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5109                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5110                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
5111                 </links>
5112         </class>
5113
5114         <class id="acqcr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::cancel_reason" oils_persist:tablename="acq.cancel_reason" reporter:label="Cancel Reason">
5115                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
5116                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5117                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
5118                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5119                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5120                 </fields>
5121                 <links>
5122                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5123                 </links>
5124                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5125                         <actions>
5126                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
5127                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
5128                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
5129                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
5130                         </actions>
5131                 </permacrud>
5132         </class>
5133
5134         <class id="acqpo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::purchase_order" oils_persist:tablename="acq.purchase_order" reporter:label="Purchase Order">
5135                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
5136                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" />
5137                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
5138                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5139                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5140                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5141                         <field reporter:label="State" name="state" reporter:datatype="text" />
5142                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
5143                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5144                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5145                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
5146                         <field reporter:label="Name" name="name" reporter:datatype="text" />
5147                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5148                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
5149                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5150                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="link" />
5151                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
5152                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
5153                 </fields>
5154                 <links>
5155                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5156                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5157                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5158                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
5159                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5160                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
5161                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
5162                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
5163                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5164                 </links>
5165                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5166                         <actions>
5167                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
5168                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
5169                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
5170                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
5171                         </actions>
5172                 </permacrud>
5173         </class>
5174
5175         <class id="acqpoh" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::acq_purchase_order_history" oils_persist:tablename="acq.acq_purchase_order_history" reporter:label="Purchase Order History">
5176                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
5177                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
5178                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
5179                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
5180                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
5181                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
5182                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5183                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5184                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
5185                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
5186                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
5187                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5188                         <field reporter:label="State" name="state" reporter:datatype="text"/>
5189                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
5190                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5191                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
5192                 </fields>
5193                 <links>
5194                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
5195                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5196                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5197                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5198                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
5199                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5200                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5201                 </links>
5202                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5203             <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
5204                 </permacrud>
5205         </class>
5206
5207         <class id="acqpon" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::po_note" oils_persist:tablename="acq.po_note" reporter:label="PO Note">
5208                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
5209                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
5210                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
5211                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5212                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5213                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5214                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5215                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
5216                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
5217                 </fields>
5218                 <links>
5219                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5220                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5221                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5222                 </links>
5223                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5224             <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
5225                 <context link="purchase_order" field="ordering_agency"/>
5226             </retrieve>
5227             <create permission="CREATE_PURCHASE_ORDER">
5228                 <context link="purchase_order" field="ordering_agency"/>
5229             </create>
5230             <update permission="CREATE_PURCHASE_ORDER">
5231                 <context link="purchase_order" field="ordering_agency"/>
5232             </update>
5233             <delete permission="CREATE_PURCHASE_ORDER">
5234                 <context link="purchase_order" field="ordering_agency"/>
5235             </delete>
5236                 </permacrud>
5237         </class>
5238
5239         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
5240                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
5241                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
5242                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
5243                         <field reporter:label="Picklist" name="picklist" reporter:datatype="link" />
5244                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
5245                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5246                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5247                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5248                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
5249                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
5250                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
5251                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
5252                         <field reporter:label="State" name="state" reporter:datatype="text" />
5253                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5254                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5255                         <field reporter:label="Claim Interval" name="claim_interval" reporter:datatype="interval" />
5256                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5257                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
5258                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
5259                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
5260                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
5261                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
5262                 </fields>
5263                 <links>
5264                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
5265                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5266                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5267                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5268                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5269                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
5270                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
5271                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
5272                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
5273                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
5274                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5275                 </links>
5276                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5277             <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
5278                 <context link="purchase_order" field="ordering_agency"/>
5279                 <context link="picklist" field="org_unit"/>
5280             </retrieve>
5281                 </permacrud>
5282         </class>
5283
5284         <class id="acqlih" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::acq_lineitem_history" oils_persist:tablename="acq.acq_lineitem_history" reporter:label="Line Item History">
5285                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
5286                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
5287                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
5288                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
5289                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
5290                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5291                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5292                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
5293                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5294                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5295                         <field reporter:label="Picklist" name="picklist" reporter:datatype="link"/>
5296                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
5297                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
5298                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
5299                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
5300                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
5301                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
5302                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
5303                         <field reporter:label="State" name="state" reporter:datatype="text"/>
5304                         <field reporter:label="Claim Interval" name="claim_interval" reporter:datatype="interval"/>
5305                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
5306                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
5307                 </fields>
5308                 <links>
5309                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
5310                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5311                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5312                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
5313                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5314                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5315                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
5316                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
5317                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5318                 </links>
5319                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5320             <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
5321                 <context link="purchase_order" field="ordering_agency"/>
5322                 <context link="picklist" field="org_unit"/>
5323             </retrieve>
5324                 </permacrud>
5325         </class>
5326
5327         <class id="acqliat" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem_alert_text" oils_persist:tablename="acq.lineitem_alert_text" reporter:label="Line Item Alert Text">
5328                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
5329                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
5330                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
5331                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5332                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
5333                 </fields>
5334                 <links>
5335                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5336                 </links>
5337                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5338                         <actions>
5339                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
5340                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
5341                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
5342                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
5343                         </actions>
5344                 </permacrud>
5345         </class>
5346
5347         <class id="acqlin" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_note" oils_persist:tablename="acq.lineitem_note" reporter:label="Line Item Note">
5348                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
5349                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
5350                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
5351                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5352                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5353                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5354                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5355                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
5356                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
5357                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
5358                 </fields>
5359                 <links>
5360                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5361                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5362                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5363                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
5364                 </links>
5365         </class>
5366
5367         <class id="acqlia" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_attr" oils_persist:tablename="acq.lineitem_attr" reporter:label="Line Item Attribute">
5368                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
5369                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
5370                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
5371                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
5372                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
5373                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
5374                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
5375                 </fields>
5376                 <links>
5377                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5378                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
5379                 </links>
5380         </class>
5381
5382         <class id="acqlid" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_detail" oils_persist:tablename="acq.lineitem_detail" reporter:label="Line Item Detail">
5383                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
5384                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
5385                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
5386                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
5387                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
5388                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
5389                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
5390                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
5391                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
5392                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
5393                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
5394                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
5395                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5396                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
5397                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5398                 </fields>
5399                 <links>
5400                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5401                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
5402                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5403                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
5404                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5405                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5406                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5407                         <link field="cancel_reason" reltype="might_have" key="id" map="" class="acqcr"/>
5408                 </links>
5409         </class>
5410
5411         <class id="acqliad" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem_attr_definition" oils_persist:tablename="acq.lineitem_attr_definition" reporter:label="Line Item Attribute Definition">
5412                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5413                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5414                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5415                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5416                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5417                 </fields>
5418                 <links/>
5419                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5420                         <actions>
5421                                 <retrieve />
5422                         </actions>
5423                 </permacrud>
5424         </class>
5425
5426         <class id="acqlimad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem_marc_attr_definition" oils_persist:tablename="acq.lineitem_marc_attr_definition" reporter:label="Line Item MARC Attribute Definition">
5427                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5428                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5429                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5430                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5431                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
5432                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5433             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
5434                 </fields>
5435                 <links/>
5436         <permacrud>
5437             <actions>
5438                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
5439                 <retrieve />
5440                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
5441                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
5442             </actions>
5443         </permacrud>
5444         </class>
5445
5446         <class id="acqligad" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_generated_attr_definition" oils_persist:tablename="acq.lineitem_generated_attr_definition" reporter:label="Line Item Generated Attribute Definition">
5447                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5448                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5449                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5450                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5451                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
5452                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5453                 </fields>
5454                 <links/>
5455         </class>
5456         <class id="acqliuad" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_usr_attr_definition" oils_persist:tablename="acq.lineitem_usr_attr_definition" reporter:label="Line Item User Attribute Definition">
5457                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5458                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5459                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5460                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5461                         <field reporter:label="User" name="usr" reporter:datatype="link" />
5462                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5463                 </fields>
5464                 <links>
5465                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5466                 </links>
5467         </class>
5468
5469         <class id="acqlipad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem_provider_attr_definition" oils_persist:tablename="acq.lineitem_provider_attr_definition" reporter:label="Line Item Provider Attribute Definition">
5470             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5471                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5472                 <field reporter:label="Code" name="code" reporter:datatype="text" />
5473                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5474                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
5475                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5476                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5477         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
5478
5479             </fields>
5480             <links>
5481                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5482             </links>
5483             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5484                 <actions>
5485                     <create permission="ADMIN_PROVIDER">
5486                         <context link="provider" field="owner"/>
5487                     </create>
5488                     <retrieve permission="ADMIN_PROVIDER">
5489                         <context link="provider" field="owner"/>
5490                     </retrieve>
5491                     <update permission="ADMIN_PROVIDER">
5492                         <context link="provider" field="owner"/>
5493                     </update>
5494                     <delete permission="ADMIN_PROVIDER">
5495                         <context link="provider" field="owner"/>
5496                     </delete>
5497                 </actions>
5498             </permacrud>
5499         </class>
5500         
5501         <class id="acqphsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider_holding_subfield_map" oils_persist:tablename="acq.provider_holding_subfield_map" reporter:label="Provider Holding Subfield Map">
5502             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
5503                 <field reporter:label="ID" name="id" reporter:datatype="id" />
5504                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5505                 <field reporter:label="Name" name="name" reporter:datatype="text" />
5506                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
5507             </fields>
5508             <links>
5509                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5510             </links>
5511             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5512                 <actions>
5513                     <create permission="ADMIN_PROVIDER">
5514                         <context link="provider" field="owner"/>
5515                     </create>
5516                     <retrieve permission="ADMIN_PROVIDER">
5517                         <context link="provider" field="owner"/>
5518                     </retrieve>
5519                     <update permission="ADMIN_PROVIDER">
5520                         <context link="provider" field="owner"/>
5521                     </update>
5522                     <delete permission="ADMIN_PROVIDER">
5523                         <context link="provider" field="owner"/>
5524                     </delete>
5525                 </actions>
5526             </permacrud>
5527         </class>
5528         
5529         <class id="acqlilad" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_local_attr_definition" oils_persist:tablename="acq.lineitem_local_attr_definition" reporter:label="Line Item Local Attribute Definition">
5530             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5531                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5532                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5533                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5534                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5535                 </fields>
5536                 <links/>
5537         </class>
5538
5539         <class id="acqedi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::edi_account" oils_persist:tablename="acq.edi_account" reporter:label="EDI Account">
5540                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
5541                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID"/>
5542                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
5543                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
5544                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
5545                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
5546                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
5547                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
5548                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
5549                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
5550                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
5551                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
5552                 </fields>
5553                 <links>
5554                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5555                 </links>
5556         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5557             <actions>
5558                 <create permission="ADMIN_PROVIDER">
5559                     <context link="provider" field="owner"/>
5560                 </create>
5561                 <retrieve permission="ADMIN_PROVIDER">
5562                     <context link="provider" field="owner"/>
5563                 </retrieve>
5564                 <update permission="ADMIN_PROVIDER">
5565                     <context link="provider" field="owner"/>
5566                 </update>
5567                 <delete permission="ADMIN_PROVIDER">
5568                     <context link="provider" field="owner"/>
5569                 </delete>
5570             </actions>
5571         </permacrud>
5572         </class>
5573
5574         <class id="acqedim" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::edi_message" oils_persist:tablename="acq.edi_message" reporter:label="EDI Message">
5575                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
5576                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
5577                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
5578                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
5579                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
5580                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
5581                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
5582                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
5583                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
5584                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
5585                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
5586                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
5587                 </fields>
5588                 <links>
5589                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
5590                 </links>
5591         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5592             <actions>
5593                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
5594                     <context link="account" jump="provider" field="owner"/>
5595                 </retrieve>
5596                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
5597                     <context link="account" jump="provider" field="owner"/>
5598                 </update>
5599                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
5600                     <context link="account" jump="provider" field="owner"/>
5601                 </delete>
5602             </actions>
5603         </permacrud>
5604         </class>
5605
5606
5607         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
5608                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
5609                         <field name="id" reporter:datatype="id" />
5610                         <field name="parent" reporter:datatype="link"/>
5611                         <field name="owner" reporter:datatype="link"/>
5612                         <field name="create_time" reporter:datatype="timestamp"/>
5613                         <field name="name" reporter:datatype="text"/>
5614                         <field name="shared" reporter:datatype="bool"/>
5615                         <field name="share_with" reporter:datatype="link"/>
5616                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5617                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
5618                 </fields>
5619                 <links>
5620                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5621                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
5622                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
5623                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
5624                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
5625                 </links>
5626         </class>
5627         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
5628                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
5629                         <field name="id" reporter:datatype="id" />
5630                         <field name="parent" reporter:datatype="link"/>
5631                         <field name="owner" reporter:datatype="link"/>
5632                         <field name="create_time" reporter:datatype="timestamp"/>
5633                         <field name="name" reporter:datatype="text"/>
5634                         <field name="shared" reporter:datatype="bool"/>
5635                         <field name="share_with" reporter:datatype="link"/>
5636                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5637                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
5638                 </fields>
5639                 <links>
5640                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5641                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
5642                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
5643                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
5644                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
5645                 </links>
5646         </class>
5647         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
5648                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
5649                         <field name="id" reporter:datatype="id" />
5650                         <field name="parent" reporter:datatype="link"/>
5651                         <field name="owner" reporter:datatype="link"/>
5652                         <field name="create_time" reporter:datatype="timestamp"/>
5653                         <field name="name" reporter:datatype="text"/>
5654                         <field name="shared" reporter:datatype="bool"/>
5655                         <field name="share_with" reporter:datatype="link"/>
5656                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5657                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
5658                 </fields>
5659                 <links>
5660                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5661                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
5662                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
5663                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
5664                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
5665                 </links>
5666         </class>
5667         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
5668                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
5669                         <field name="id" reporter:datatype="id" />
5670                         <field name="owner" reporter:datatype="link"/>
5671                         <field name="create_time" reporter:datatype="timestamp"/>
5672                         <field name="name" reporter:datatype="text"/>
5673                         <field name="data" reporter:datatype="text"/>
5674                         <field name="folder" reporter:datatype="link"/>
5675                         <field name="description" reporter:datatype="text"/>
5676                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
5677                 </fields>
5678                 <links>
5679                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5680                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
5681                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
5682                 </links>
5683         </class>
5684         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
5685                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
5686                         <field name="id" reporter:datatype="id" />
5687                         <field name="owner" reporter:datatype="link"/>
5688                         <field name="create_time" reporter:datatype="timestamp"/>
5689                         <field name="template" reporter:datatype="link"/>
5690                         <field name="data" reporter:datatype="link"/>
5691                         <field name="folder" reporter:datatype="link"/>
5692                         <field name="recur" reporter:datatype="bool"/>
5693                         <field name="recurrence" reporter:datatype="interval"/>
5694                         <field name="name" reporter:datatype="text"/>
5695                         <field name="description" reporter:datatype="text"/>
5696                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
5697                 </fields>
5698                 <links>
5699                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5700                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
5701                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
5702                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
5703                 </links>
5704         </class>
5705         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
5706                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
5707                         <field name="id" reporter:datatype="id" />
5708                         <field name="runner" reporter:datatype="link"/>
5709                         <field name="start_time" reporter:datatype="timestamp"/>
5710                         <field name="complete_time" reporter:datatype="timestamp"/>
5711                         <field name="run_time" reporter:datatype="timestamp"/>
5712                         <field name="email" reporter:datatype="text"/>
5713                         <field name="excel_format" reporter:datatype="bool"/>
5714                         <field name="csv_format" reporter:datatype="bool"/>
5715                         <field name="html_format" reporter:datatype="bool"/>
5716                         <field name="error_code" reporter:datatype="int"/>
5717                         <field name="error_text" reporter:datatype="text"/>
5718                         <field name="report" reporter:datatype="link"/>
5719                         <field name="folder" reporter:datatype="link"/>
5720                         <field name="chart_pie" reporter:datatype="bool"/>
5721                         <field name="chart_bar" reporter:datatype="bool"/>
5722                         <field name="chart_line" reporter:datatype="bool"/>
5723                 </fields>
5724                 <links>
5725                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
5726                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
5727                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
5728                 </links>
5729         </class>
5730         <class id="rmsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::materialized_simple_record" oils_persist:tablename="reporter.materialized_simple_record" reporter:label="Fast Simple Record Extracts">
5731                 <fields oils_persist:primary="id">
5732                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5733                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
5734                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
5735                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
5736                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
5737                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
5738                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
5739                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
5740                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
5741                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
5742                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
5743                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
5744                 </fields>
5745                 <links>
5746                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
5747                 </links>
5748         </class>
5749         <class id="rssr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::super_simple_record" oils_persist:tablename="reporter.super_simple_record" reporter:label="Simple Record Extracts">
5750                 <fields oils_persist:primary="id">
5751                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5752                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
5753                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
5754                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
5755                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
5756                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
5757                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
5758                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
5759                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
5760                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
5761                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
5762                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
5763                 </fields>
5764                 <links>
5765                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
5766                 </links>
5767         </class>
5768         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
5769                 <fields oils_persist:primary="id">
5770                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5771                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
5772                         <field reporter:label="Fingerprint" name="fingerprint" />
5773                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
5774                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
5775                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
5776                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
5777                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
5778                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
5779                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
5780                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
5781                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
5782                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
5783                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
5784                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
5785                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
5786                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
5787                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
5788                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
5789                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
5790                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
5791                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
5792                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
5793                 </fields>
5794                 <links>
5795                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
5796                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
5797                 </links>
5798         </class>
5799         <class id="rud" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::user_demographic" oils_persist:tablename="reporter.demographic" reporter:label="User Demographics">
5800                 <fields oils_persist:primary="id">
5801                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
5802                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
5803                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
5804                 </fields>
5805                 <links>
5806                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
5807                 </links>
5808         </class>
5809         <class id="rcirct" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::circulation_type" oils_persist:tablename="reporter.circ_type" reporter:label="Circulation Type">
5810                 <fields oils_persist:primary="id">
5811                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
5812                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
5813                 </fields>
5814                 <links>
5815                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
5816                 </links>
5817         </class>
5818         <class id="rhrr" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::hold_request_record" oils_persist:tablename="reporter.hold_request_record" reporter:label="Hold Request Record">
5819                 <fields oils_persist:primary="id">
5820                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5821                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
5822                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
5823                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
5824                 </fields>
5825                 <links>
5826                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
5827                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
5828                 </links>
5829         </class>
5830         <class id="rxbt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::xact_billing_totals" oils_persist:tablename="reporter.xact_billing_totals" reporter:label="Transaction Billing Totals">
5831                 <fields oils_persist:primary="xact">
5832                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
5833                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
5834                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
5835                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
5836                 </fields>
5837                 <links>
5838                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
5839                 </links>
5840         </class>
5841         <class id="rxpt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::xact_paid_totals" oils_persist:tablename="reporter.xact_paid_totals" reporter:label="Transaction Paid Totals">
5842                 <fields oils_persist:primary="xact">
5843                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
5844                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
5845                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
5846                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
5847                 </fields>
5848                 <links>
5849                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
5850                 </links>
5851         </class>
5852         <class id="ergbhu" controller="open-ils.reporter-store" oils_obj:fieldmapper="extend_reporter::global_bibs_by_holding_update" oils_persist:tablename="extend_reporter.global_bibs_by_holding_update" reporter:label="Bib IDs by Holding Add/Delete Time (OCLC batch update)">
5853                 <fields oils_persist:primary="id">
5854                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
5855                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
5856                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
5857                 </fields>
5858                 <links>
5859                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
5860                 </links>
5861         </class>
5862         <class id="erfcc" controller="open-ils.reporter-store" oils_obj:fieldmapper="extend_reporter::full_circ_count" oils_persist:tablename="extend_reporter.full_circ_count" reporter:label="Total Circulation Count, Including Legacy">
5863                 <fields oils_persist:primary="id">
5864                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
5865                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
5866                 </fields>
5867                 <links>
5868                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
5869                 </links>
5870         </class>
5871         <class id="acqdf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::distribution_formula" oils_persist:tablename="acq.distribution_formula" reporter:label="Distribution Formula">
5872                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
5873                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
5874                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
5875                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
5876                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
5877                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5878                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
5879                 </fields>
5880                 <links>
5881                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5882                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
5883                 </links>
5884                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5885                         <actions>
5886                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
5887                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
5888                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
5889                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
5890                         </actions>
5891                 </permacrud>
5892         </class>
5893         <class id="acqdfe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::distribution_formula_entry" oils_persist:tablename="acq.distribution_formula_entry" reporter:label="Distribution Formula Entry">
5894                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
5895                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
5896                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
5897                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
5898                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
5899                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5900                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
5901                 </fields>
5902                 <links>
5903                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
5904                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5905                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5906                 </links>
5907                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5908                         <actions>
5909                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
5910                                         <context link="formula" field="owner"/>
5911                                 </create>
5912                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
5913                                         <context link="formula" field="owner"/>
5914                                 </retrieve>
5915                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
5916                                         <context link="formula" field="owner"/>
5917                                 </update>
5918                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
5919                                         <context link="formula" field="owner"/>
5920                                 </delete>
5921                         </actions>
5922                 </permacrud>
5923         </class>
5924
5925         <class id="acqdfa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::distribution_formula_application" oils_persist:tablename="acq.distribution_formula_application" reporter:label="Distribution Formula Application">
5926                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
5927                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5928                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5929                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
5930                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
5931                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
5932                 </fields>
5933                 <links>
5934                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5935                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
5936                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5937                 </links>
5938                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5939                         <actions>
5940                                 <create permission="CREATE_PURCHASE_ORDER">
5941                                         <context link="formula" field="owner"/>
5942                 </create>
5943                                 <retrieve permission="CREATE_PURCHASE_ORDER">
5944                                         <context link="formula" field="owner"/>
5945                 </retrieve>
5946                                 <update permission="CREATE_PURCHASE_ORDER">
5947                                         <context link="formula" field="owner"/>
5948                 </update>
5949                                 <delete permission="CREATE_PURCHASE_ORDER">
5950                                         <context link="formula" field="owner"/>
5951                 </delete>
5952                         </actions>
5953                 </permacrud>
5954         </class>
5955
5956         <class id="acqda" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
5957                 <fields oils_persist:primary="id">
5958                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
5959                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
5960                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
5961                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
5962                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
5963                 </fields>
5964                 <links>
5965                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
5966                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
5967                 </links>
5968                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5969                 </permacrud>
5970         </class>
5971
5972     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
5973         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
5974             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
5975             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
5976             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
5977             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
5978             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5979             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
5980             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
5981             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
5982             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
5983             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
5984             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
5985             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
5986             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
5987             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
5988             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
5989         </fields>
5990     </class>
5991
5992     <class id="stgc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="staging::card_stage" oils_persist:tablename="staging.card_stage" reporter:label="Card Stage">
5993         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
5994             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
5995             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
5996             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
5997             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5998             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
5999         </fields>
6000     </class>
6001
6002     <class id="stgma" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="staging::mailing_address_stage" oils_persist:tablename="staging.mailing_address_stage" reporter:label="Mailing Address Stage">
6003         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
6004             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
6005             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
6006             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
6007             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
6008             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
6009             <field reporter:label="City" name="city" reporter:datatype="text"/>
6010             <field reporter:label="State" name="state" reporter:datatype="text"/>
6011             <field reporter:label="Country" name="country" reporter:datatype="text"/>
6012             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6013             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
6014         </fields>
6015     </class>
6016
6017     <class id="stgba" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="staging::billing_address_stage" oils_persist:tablename="staging.billing_address_stage" reporter:label="Billing Address Stage">
6018         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
6019             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
6020             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
6021             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
6022             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
6023             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
6024             <field reporter:label="City" name="city" reporter:datatype="text"/>
6025             <field reporter:label="State" name="state" reporter:datatype="text"/>
6026             <field reporter:label="Country" name="country" reporter:datatype="text"/>
6027             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6028             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
6029         </fields>
6030     </class>
6031
6032     <class id="stgsc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="staging::statcat_stage" oils_persist:tablename="staging.statcat_stage" reporter:label="Statistical Category Stage">
6033         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
6034             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
6035             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
6036             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
6037             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
6038             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
6039             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
6040         </fields>
6041     </class>
6042
6043     <class id="aufhl" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_loops" oils_persist:tablename="action.unfulfilled_hold_loops" oils_persist:readonly="true">
6044         <fields>
6045             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6046             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
6047             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
6048         </fields>
6049                 <links>
6050                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6051                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6052                 </links>
6053     </class>
6054
6055     <class id="aufhml" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_min_loop" oils_persist:tablename="action.unfulfilled_hold_min_loop" oils_persist:readonly="true">
6056         <fields>
6057             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6058             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
6059         </fields>
6060                 <links>
6061                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6062                 </links>
6063     </class>
6064
6065     <class id="aufhil" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_innermost_loop" oils_persist:tablename="action.unfulfilled_hold_innermost_loop" oils_persist:readonly="true">
6066         <fields>
6067             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6068             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
6069             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
6070         </fields>
6071                 <links>
6072                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6073                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6074                 </links>
6075     </class>
6076
6077     <class id="aufhmxl" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_max_loop" oils_persist:tablename="action.unfulfilled_hold_max_loop" oils_persist:readonly="true">
6078         <fields>
6079             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6080             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
6081         </fields>
6082                 <links>
6083                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6084                 </links>
6085     </class>
6086
6087     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
6088                 <oils_persist:source_definition>
6089
6090             SELECT  DISTINCT l.*
6091               FROM  action.unfulfilled_hold_loops l
6092                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
6093               WHERE l.count = m.max
6094
6095                 </oils_persist:source_definition>
6096         <fields>
6097             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6098             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
6099             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
6100         </fields>
6101                 <links>
6102                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6103                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6104                 </links>
6105     </class>
6106
6107         <class id="qsq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
6108                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
6109                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
6110                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
6111                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
6112                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
6113                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="int"/>
6114                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="int"/>
6115                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="int"/>
6116                 </fields>
6117                 <links>
6118                 </links>
6119                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6120                 </permacrud>
6121         </class>
6122
6123         <class id="qseq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
6124                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
6125                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
6126                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
6127                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6128                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
6129                 </fields>
6130                 <links>
6131                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
6132                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
6133                 </links>
6134                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6135                 </permacrud>
6136         </class>
6137
6138         <class id="qdt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
6139                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
6140                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
6141                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
6142                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
6143                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
6144                 </fields>
6145                 <links>
6146                 </links>
6147                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6148                 </permacrud>
6149         </class>
6150
6151         <class id="qsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
6152                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
6153                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
6154                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
6155                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6156                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
6157                 </fields>
6158                 <links>
6159                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
6160                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
6161                 </links>
6162                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6163                 </permacrud>
6164         </class>
6165         
6166         <class id="qfs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
6167                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
6168                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
6169                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
6170                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
6171                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
6172                 </fields>
6173                 <links>
6174                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
6175                 </links>
6176                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6177                 </permacrud>
6178         </class>
6179         
6180         <class id="qfpd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::function_param_def" oils_persist:tablename="query.function_param_def" reporter:label="Function Parameter Definition">
6181                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
6182                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
6183                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
6184                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6185                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
6186                 </fields>
6187                 <links>
6188                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
6189                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
6190                 </links>
6191                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6192                 </permacrud>
6193         </class>
6194
6195         <class id="qxp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
6196                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6197                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6198                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
6199                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6200                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6201                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6202                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
6203                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
6204                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
6205                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
6206                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
6207                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
6208                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
6209                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6210                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
6211                 </fields>
6212                 <links>
6213                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
6214                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
6215                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
6216                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
6217                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
6218                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
6219                 </links>
6220                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6221                 </permacrud>
6222         </class>
6223
6224         <class id="qcb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
6225                 <fields oils_persist:primary="id" oils_persist:sequence="case_branch_id_seq">
6226                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
6227                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6228                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6229                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
6230                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
6231                 </fields>
6232                 <links>
6233                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
6234                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
6235                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
6236                 </links>
6237                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6238                 </permacrud>
6239         </class>
6240
6241         <class id="qfr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
6242                 <fields oils_persist:primary="id" oils_persist:sequence="from_relation_id_seq">
6243                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
6244                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
6245                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
6246                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
6247                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
6248                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
6249                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
6250                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
6251                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6252                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
6253                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
6254                 </fields>
6255                 <links>
6256                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
6257                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
6258                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
6259                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
6260                 </links>
6261                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6262                 </permacrud>
6263         </class>
6264
6265         <class id="qrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
6266                 <fields oils_persist:primary="id" oils_persist:sequence="record_column_id_seq">
6267                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
6268                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
6269                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6270                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
6271                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
6272                 </fields>
6273                 <links>
6274                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
6275                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
6276                 </links>
6277                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6278                 </permacrud>
6279         </class>
6280
6281         <class id="qsi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
6282                 <fields oils_persist:primary="id" oils_persist:sequence="select_item_id_seq">
6283                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
6284                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
6285                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6286                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
6287                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
6288                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
6289                 </fields>
6290                 <links>
6291                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
6292                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
6293                 </links>
6294                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6295                 </permacrud>
6296         </class>
6297
6298         <class id="qobi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::order_by_item" oils_persist:tablename="query.order_by_item" reporter:label="Order By Item">
6299                 <fields oils_persist:primary="id" oils_persist:sequence="order_by_item_id_seq">
6300                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
6301                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
6302                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6303                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
6304                 </fields>
6305                 <links>
6306                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
6307                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
6308                 </links>
6309                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6310                 </permacrud>
6311         </class>
6312
6313         <class id="xbet" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
6314                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6315                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6316                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6317                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6318                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6319                 </fields>
6320                 <links>
6321                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
6322                 </links>
6323                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6324                 </permacrud>
6325         </class>
6326
6327         <class id="xbool" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
6328                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6329                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6330                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6331                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6332                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6333                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
6334                 </fields>
6335                 <links>
6336                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
6337                 </links>
6338                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6339                 </permacrud>
6340         </class>
6341
6342         <class id="xcase" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
6343                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6344                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6345                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6346                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6347                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6348                 </fields>
6349                 <links>
6350                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
6351                 </links>
6352                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6353                 </permacrud>
6354         </class>
6355
6356         <class id="xcast" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
6357                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6358                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6359                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6360                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6361                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6362                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
6363                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
6364                 </fields>
6365                 <links>
6366                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6367                         <link field="left_operand" reltype="might_have" key="id" map="" class="qxp"/>
6368                         <link field="cast_type" reltype="might_have" key="id" map="" class="qdt"/>
6369                 </links>
6370                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6371                 </permacrud>
6372         </class>
6373
6374         <class id="xcol" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
6375                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6376                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6377                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6378                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6379                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6380                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
6381                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
6382                 </fields>
6383                 <links>
6384                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6385                 </links>
6386                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6387                 </permacrud>
6388         </class>
6389
6390         <class id="xex" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
6391                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6392                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6393                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6394                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6395                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6396                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6397                 </fields>
6398                 <links>
6399                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6400                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
6401                 </links>
6402                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6403                 </permacrud>
6404         </class>
6405
6406         <class id="xfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xfld" oils_persist:tablename="query.expr_xfld" reporter:label="Field Expression">
6407                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6408                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6409                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6410                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6411                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6412                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
6413                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
6414                 </fields>
6415                 <links>
6416                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6417                         <link field="left_operand" reltype="might_have" key="id" map="" class="qxp"/>
6418                 </links>
6419                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6420                 </permacrud>
6421         </class>
6422
6423         <class id="xfunc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
6424                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6425                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6426                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6427                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6428                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6429                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
6430                 </fields>
6431                 <links>
6432                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6433                         <link field="function_id" reltype="might_have" key="id" map="" class="qfs"/>
6434                 </links>
6435                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6436                 </permacrud>
6437         </class>
6438
6439         <class id="xin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
6440                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6441                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6442                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6443                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6444                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6445                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6446                 </fields>
6447                 <links>
6448                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6449                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
6450                 </links>
6451                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6452                 </permacrud>
6453         </class>
6454
6455         <class id="xnbet" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xnbet" oils_persist:tablename="query.expr_xnbet" reporter:label="Not Between Expression">
6456                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6457                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6458                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6459                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6460                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6461                 </fields>
6462                 <links>
6463                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6464                 </links>
6465                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6466                 </permacrud>
6467         </class>
6468
6469         <class id="xnex" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xnex" oils_persist:tablename="query.expr_xnex" reporter:label="Not Exists Expression">
6470                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6471                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6472                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6473                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6474                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6475                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6476                 </fields>
6477                 <links>
6478                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6479                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
6480                 </links>
6481                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6482                 </permacrud>
6483         </class>
6484
6485         <class id="xnin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xnin" oils_persist:tablename="query.expr_xnin" reporter:label="Not In Expression">
6486                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6487                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6488                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6489                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6490                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6491                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6492                 </fields>
6493                 <links>
6494                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6495                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
6496                 </links>
6497                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6498                 </permacrud>
6499         </class>
6500
6501         <class id="xnull" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
6502                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6503                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6504                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6505                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6506                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6507                 </fields>
6508                 <links>
6509                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6510                 </links>
6511                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6512                 </permacrud>
6513         </class>
6514
6515         <class id="xnum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
6516                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6517                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6518                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6519                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6520                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6521                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
6522                 </fields>
6523                 <links>
6524                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6525                 </links>
6526                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6527                 </permacrud>
6528         </class>
6529
6530         <class id="xop" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
6531                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6532                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6533                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6534                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6535                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6536                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
6537                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
6538                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
6539                 </fields>
6540                 <links>
6541                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6542                         <link field="left_operand" reltype="might_have" key="id" map="" class="qxp"/>
6543                         <link field="right_operand" reltype="might_have" key="id" map="" class="qxp"/>
6544                 </links>
6545                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6546                 </permacrud>
6547         </class>
6548
6549         <class id="xstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_string" oils_persist:tablename="query.expr_string" reporter:label="String Expression">
6550                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6551                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6552                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6553                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6554                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6555                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
6556                 </fields>
6557                 <links>
6558                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6559                 </links>
6560                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6561                 </permacrud>
6562         </class>
6563
6564         <class id="xsubq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
6565                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6566                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6567                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6568                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6569                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6570                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6571                 </fields>
6572                 <links>
6573                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6574                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
6575                 </links>
6576                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6577                 </permacrud>
6578         </class>
6579
6580         <class id="bmpc" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::marc21_physical_characteristics" oils_persist:tablename="biblio.marc21_physical_characteristics" reporter:label="MARC21 Physical Characteristics" oils_persist:field_safe="true" oils_persist:readonly="true">
6581                 <fields oils_persist:primary="id">
6582                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
6583                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
6584                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
6585                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
6586                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
6587                 </fields>
6588                 <links>
6589                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
6590                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
6591                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
6592                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6593                 </links>
6594         </class>
6595
6596         <class id="cmfpm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_ff_pos_map" oils_persist:tablename="config.marc21_ff_pos_map" reporter:label="MARC21 Fixed Field Map" oils_persist:field_safe="true">
6597                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
6598                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6599                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
6600                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
6601                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
6602                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
6603                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
6604                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
6605                 </fields>
6606                 <links/>
6607                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6608                         <actions>
6609                                 <retrieve/>
6610                         </actions>
6611                 </permacrud>
6612         </class>
6613
6614         <class id="cmpctm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_physical_characteristic_type_map" oils_persist:tablename="config.marc21_physical_characteristic_type_map" reporter:label="MARC21 Physical Characteristic Type Map" oils_persist:field_safe="true">
6615                 <fields oils_persist:primary="ptype_key">
6616                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
6617                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6618                 </fields>
6619                 <links/>
6620                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6621                         <actions>
6622                                 <retrieve/>
6623                         </actions>
6624                 </permacrud>
6625         </class>
6626
6627         <class id="cmpcsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_physical_characteristic_subfield_map" oils_persist:tablename="config.marc21_physical_characteristic_subfield_map" reporter:label="MARC21 Physical Characteristic Subfield Map" oils_persist:field_safe="true">
6628                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
6629                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6630                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
6631                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
6632                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
6633                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
6634                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6635                 </fields>
6636                 <links>
6637                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
6638                 </links>
6639                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6640                         <actions>
6641                                 <retrieve/>
6642                         </actions>
6643                 </permacrud>
6644         </class>
6645
6646         <class id="cmpcvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_physical_characteristic_value_map" oils_persist:tablename="config.marc21_physical_characteristic_value_map" reporter:label="MARC21 Physical Characteristic Value Map" oils_persist:field_safe="true">
6647                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
6648                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6649                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
6650                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
6651                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6652                 </fields>
6653                 <links>
6654                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
6655                 </links>
6656                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6657                         <actions>
6658                                 <retrieve/>
6659                         </actions>
6660                 </permacrud>
6661         </class>
6662
6663         <class id="cmrtm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_rec_type_map" oils_persist:tablename="config.marc21_rec_type_map" reporter:label="MARC21 Record Type Map" oils_persist:field_safe="true">
6664                 <fields oils_persist:primary="code">
6665                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
6666                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
6667                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
6668                 </fields>
6669                 <links/>
6670                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6671                         <actions>
6672                                 <retrieve/>
6673                         </actions>
6674                 </permacrud>
6675         </class>
6676
6677         <class id="rlcd" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::last_copy_deleted" oils_persist:readonly="true" reporter:core="true" reporter:label="Last Copy Delete Time">
6678                 <oils_persist:source_definition>
6679
6680             SELECT  b.id,
6681                     MAX(dcp.edit_date) AS last_delete_date
6682              FROM   biblio.record_entry b
6683                     JOIN asset.call_number cn ON (cn.record = b.id)
6684                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
6685              WHERE  NOT b.deleted
6686              GROUP BY b.id
6687              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
6688
6689                 </oils_persist:source_definition>
6690                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
6691                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
6692                         <field reporter:label="Delete Date/Time" name="copy_delete_date" reporter:datatype="timestamp"/>
6693                 </fields>
6694                 <links>
6695                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
6696                 </links>
6697                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6698                         <actions>
6699                                 <retrieve/>
6700                         </actions>
6701                 </permacrud>
6702         </class>
6703
6704
6705         <!-- ********************************************************************************************************************* -->
6706         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
6707         <!-- ********************************************************************************************************************* -->
6708         <class id="rccc" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::classic_current_circ" oils_persist:tablename="reporter.classic_current_circ" reporter:core="true" reporter:label="Classic Circulation View">
6709                 <fields oils_persist:primary="id">
6710                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
6711                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
6712                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
6713                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6714                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
6715                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
6716                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
6717                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
6718                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
6719                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
6720                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
6721                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
6722                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
6723                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
6724                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
6725                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
6726                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
6727                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
6728                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
6729                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
6730                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
6731                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
6732                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
6733                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
6734                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
6735                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
6736                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
6737                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
6738                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
6739                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
6740                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
6741                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
6742                 </fields>
6743                 <links>
6744                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
6745                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
6746                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
6747                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
6748                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6749                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
6750                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
6751                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
6752                 </links>
6753         </class>
6754
6755         <class id="rsce1" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::legacy_cat1" oils_persist:tablename="reporter.legacy_cat1" reporter:label="CAT1 Entry">
6756                 <fields oils_persist:primary="id">
6757                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
6758                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6759                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6760                 </fields>
6761                 <links>
6762                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6763                 </links>
6764         </class>
6765
6766         <class id="rsce2" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::legacy_cat2" oils_persist:tablename="reporter.legacy_cat2" reporter:label="CAT2 Entry">
6767                 <fields oils_persist:primary="id">
6768                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
6769                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6770                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6771                 </fields>
6772                 <links>
6773                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6774                 </links>
6775         </class>
6776
6777         <class id="rccbs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::classic_current_billing_summary" oils_persist:tablename="reporter.classic_current_billing_summary" reporter:core="true" reporter:label="Classic Open Transaction Summary">
6778                 <fields oils_persist:primary="id">
6779                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6780
6781                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
6782                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
6783                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
6784
6785                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
6786                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
6787                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
6788
6789                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
6790                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
6791
6792                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6793                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6794                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
6795
6796                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
6797                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
6798
6799                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
6800                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
6801                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
6802
6803                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
6804                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
6805                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
6806
6807                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
6808                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
6809                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
6810                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
6811
6812                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
6813                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
6814
6815                 </fields>
6816                 <links>
6817                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
6818                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6819                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6820                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6821                 </links>
6822         </class>
6823
6824         <class id="iatc" controller="open-ils.reporter-store" oils_obj:fieldmapper="action::intersystem_transit_copy" oils_persist:readonly="true" reporter:core="true" reporter:label="Inter-system Copy Transit">
6825                 <oils_persist:source_definition>
6826
6827                         SELECT  t.*
6828                           FROM  action.transit_copy t
6829                                 JOIN actor.org_unit AS s ON (t.source = s.id)
6830                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
6831                           WHERE s.parent_ou &lt;&gt; d.parent_ou
6832
6833                 </oils_persist:source_definition>
6834                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6835                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
6836                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
6837                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6838                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
6839                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
6840                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
6841                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
6842                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6843                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6844                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6845                 </fields>
6846                 <links>
6847                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
6848                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6849                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6850                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6851                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6852                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
6853                 </links>
6854         </class>
6855
6856     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
6857                 <oils_persist:source_definition>
6858
6859         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
6860                 SELECT
6861                         cp.id as copy,
6862                         COUNT(circ.id),
6863                         EXTRACT(YEAR FROM circ.xact_start) AS year,
6864                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
6865                 FROM
6866                         asset.copy cp
6867                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
6868                 GROUP BY 1, 3, 4
6869                 UNION
6870                 SELECT
6871                         cp.id as copy,
6872                         COUNT(circ.id),
6873                         EXTRACT(YEAR FROM circ.xact_start) AS year,
6874                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
6875                 FROM
6876                         asset.copy cp
6877                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
6878                 GROUP BY 1, 3, 4
6879                 UNION
6880                 SELECT
6881                         id as copy,
6882                         circ_count,
6883                         -1 AS year,
6884                         false as is_renewal
6885                 FROM
6886                         extend_reporter.legacy_circ_count
6887         )x GROUP BY 1, 3, 4
6888
6889                 </oils_persist:source_definition>
6890         <fields>
6891             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
6892             <field reporter:label="Count" name="count" reporter:datatype="int"/>
6893             <field reporter:label="Year" name="year" reporter:datatype="int"/>
6894             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
6895         </fields>
6896                 <links>
6897                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
6898                 </links>
6899                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6900                         <actions>
6901                                 <retrieve/>
6902                         </actions>
6903                 </permacrud>
6904     </class>
6905
6906         <class id="rodcirc" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::overdue_circs" oils_persist:tablename="reporter.overdue_circs" reporter:core="true" reporter:label="Overdue Circulation">
6907                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6908                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
6909                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
6910                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
6911                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6912                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
6913                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
6914                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
6915                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
6916                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
6917                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
6918                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
6919                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
6920                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
6921                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
6922                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
6923                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
6924                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
6925                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
6926                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
6927                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
6928                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
6929                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
6930                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
6931                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
6932                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6933                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6934                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6935                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
6936                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
6937                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
6938                 </fields>
6939                 <links>
6940                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6941                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
6942                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
6943                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6944                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
6945                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6946                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6947                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6948                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6949                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6950                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6951                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6952                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
6953                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6954                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6955                 </links>
6956         </class>
6957
6958     <class id="rocit" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::classic_item_list" oils_persist:tablename="reporter.classic_item_list" reporter:core="true" reporter:label="Classic Item List">
6959         <fields oils_persist:primary="id">
6960             <field reporter:label="Title" name="title" reporter:datatype="text"/>
6961             <field reporter:label="Author" name="author" reporter:datatype="text"/>
6962             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
6963             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6964             <field reporter:label="Price" name="price" reporter:datatype="money"/>
6965             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6966             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
6967             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
6968             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
6969             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
6970             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
6971             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
6972             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
6973             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
6974             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
6975             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
6976             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6977             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6978             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
6979             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
6980             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6981             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6982             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6983             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
6984             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6985             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
6986             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
6987             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
6988             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
6989             <field reporter:label="Status" name="status" reporter:datatype="link"/>
6990             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
6991             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
6992             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
6993             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
6994         </fields>
6995         <links>
6996             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6997             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6998             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6999             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7000             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7001         </links>
7002     </class>
7003
7004     <class id="rmocbbol" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::money::open_circ_balance_by_owning_lib" oils_persist:tablename="money.open_circ_balance_by_owning_lib" reporter:core="true" reporter:label="Open Circulation Billing by Owning Library">
7005         <fields oils_persist:primary="id">
7006             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
7007             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7008             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
7009             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
7010         </fields>
7011         <links>
7012             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
7013             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7014         </links>
7015     </class>
7016
7017     <class id="rmobbol" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::money::open_balance_by_owning_lib" oils_persist:tablename="money.open_balance_by_owning_lib" reporter:core="true" reporter:label="Open Circulation Balance by Owning Library">
7018         <fields oils_persist:primary="owning_lib">
7019             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7020             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
7021             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
7022         </fields>
7023         <links>
7024             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7025         </links>
7026     </class>
7027
7028     <class id="rmocbbcol" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::money::open_circ_balance_by_circ_and_owning_lib" oils_persist:tablename="money.open_circ_balance_by_circ_and_owning_lib" reporter:core="true" reporter:label="Open Circulation Billing by Circulating Library and Owning Library">
7029         <fields oils_persist:primary="id">
7030             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
7031             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
7032             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7033             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
7034             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
7035         </fields>
7036         <links>
7037             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
7038             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7039             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7040         </links>
7041     </class>
7042
7043     <class id="rmobbcol" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::money::open_balance_by_circ_and_owning_lib" oils_persist:tablename="money.open_balance_by_circ_and_owning_lib" reporter:core="true" reporter:label="Open Circulation Balance by Circulating Library and Owning Library">
7044         <fields oils_persist:primary="circ_lib">
7045             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
7046             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7047             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
7048             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
7049         </fields>
7050         <links>
7051             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7052             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7053         </links>
7054     </class>
7055
7056     <class id="rmocbbhol" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::money::open_circ_balance_by_usr_home_and_owning_lib" oils_persist:tablename="money.open_circ_balance_by_usr_home_and_owning_lib" reporter:core="true" reporter:label="Open Circulation Billing by User Home Library and Owning Library">
7057         <fields oils_persist:primary="id">
7058             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
7059             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
7060             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7061             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
7062             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
7063         </fields>
7064         <links>
7065             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
7066             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7067             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
7068         </links>
7069     </class>
7070
7071     <class id="rmobbhol" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::money::open_balance_by_usr_home_and_owning_lib" oils_persist:tablename="money.open_balance_by_usr_home_and_owning_lib" reporter:core="true" reporter:label="Open Circulation Balance by User Home Library and Owning Library">
7072         <fields oils_persist:primary="home_ou">
7073             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
7074             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7075             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
7076             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
7077         </fields>
7078         <links>
7079             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7080             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
7081         </links>
7082     </class>
7083         <class id="acqft" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_tag" oils_persist:tablename="acq.fund_tag" reporter:label="Fund Tag">
7084                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
7085                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
7086                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
7087                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
7088                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7089                 </fields>
7090                 <links>
7091                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7092                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
7093                 </links>
7094                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7095                         <actions>
7096                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
7097                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
7098                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
7099                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
7100                         </actions>
7101                 </permacrud>
7102         </class>
7103         <class id="acqftm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_tag_map" oils_persist:tablename="acq.fund_tag_map" reporter:label="Fund Tag Map">
7104                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
7105                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
7106                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
7107                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
7108                 </fields>
7109                 <links>
7110                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7111                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
7112                         </links>
7113                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7114                 <actions>
7115                                 <create permission="ADMIN_ACQ_FUND_TAG">
7116                                         <context link="tag" field="owner"/>
7117                                 </create>
7118                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7119                                         <context link="tag" field="owner"/>
7120                                 </retrieve>
7121                                 <update permission="ADMIN_ACQ_FUND_TAG">
7122                                         <context link="tag" field="owner"/>
7123                                 </update>
7124                                 <delete permission="ADMIN_ACQ_FUND_TAG">
7125                                         <context link="tag" field="owner"/>
7126                                 </delete>
7127                         </actions>
7128                 </permacrud>
7129         </class>
7130
7131         <!-- ********************************************************************************************************************* -->
7132
7133 </IDL>
7134
7135 <!--
7136     vim:noet:ts=4:sw=4:
7137 -->