]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Miscellaneous fix-ups to IDL.
[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="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">
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="Field" name="field" reporter:datatype="text"/>
138                 </fields>
139                 <links>
140                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
141                 </links>
142                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
143                         <actions>
144                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
145                                 <retrieve permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
146                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
147                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
148                         </actions>
149                 </permacrud>
150         </class>
151
152         <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 Attribute Definition">
153                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
154                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
155                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
156                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
157                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
158                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
159                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
160                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
161                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
162                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
163                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
164                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
165                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
166                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
167                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
168                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
169                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
170                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
171                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
172                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
173                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
174                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
175                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
176                 </fields>
177                 <links>
178                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
179                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
180                 </links>
181                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
182                         <actions>
183                                 <create permission="CREATE_IMPORT_ITEM">
184                     <context link="definition" field="owner"/>
185                                 </create>
186                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
187                     <context link="definition" field="owner"/>
188                                 </retrieve>
189                                 <update permission="UPDATE_IMPORT_ITEM">
190                     <context link="definition" field="owner"/>
191                                 </update>
192                                 <delete permission="DELETE_IMPORT_ITEM">
193                     <context link="definition" field="owner"/>
194                                 </delete>
195                         </actions>
196                 </permacrud>
197         </class>
198
199         <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">
200                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
201                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
202                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
203                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
204                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
205                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
206                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
207                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
208                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
209                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
210                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
211                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
212                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
213                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
214                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
215                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
216                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
217                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
218                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
219                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
220                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
221                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
222                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
223                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
224                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
225                 </fields>
226                 <links>
227                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
228                 </links>
229                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
230                         <actions>
231                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
232                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
233                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
234                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
235                         </actions>
236                 </permacrud>
237         </class>
238
239         <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">
240                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
241                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
242                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
243                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
244                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
245                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
246                 </fields>
247                 <links>
248                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
249                 </links>
250                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
251                         <actions>
252                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
253                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
254                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
255                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
256                         </actions>
257                 </permacrud>
258         </class>
259
260         <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">
261                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
262                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
263                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
264                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
265                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
266                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
267                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
268                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
269                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
270                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
271                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
272                 </fields>
273                 <links>
274                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
275                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
276                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
277             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
278             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
279                 </links>
280                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
281                         <actions>
282                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
283                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
284                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
285                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
286                         </actions>
287                 </permacrud>
288         </class>
289
290         <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">
291                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
292                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
293                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
294                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
295                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
296                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
297                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
298                 </fields>
299                 <links/>
300                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
301                         <actions>
302                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
303                 <retrieve/>
304                 <!--
305                                 <retrieve permission="CREATE_BIB_IMPORT_IMPORT_FIELD_DEF UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
306                 -->
307                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
308                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
309                         </actions>
310                 </permacrud>
311         </class>
312
313         <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">
314                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
315                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
316                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
317                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
318                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
319                 </fields>
320                 <links>
321                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
322                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
323                 </links>
324                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
325                         <actions>
326                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
327                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
328                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
329                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
330                         </actions>
331                 </permacrud>
332         </class>
333
334         <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">
335                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
336                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
337                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
338                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
339                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
340                         <field reporter:label="Field Type" name="field_type" reporter:datatype="text"/>
341                 </fields>
342                 <links>
343                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
344                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
345                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
346                 </links>
347                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
348                         <actions>
349                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
350                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
351                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
352                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
353                         </actions>
354                 </permacrud>
355         </class>
356
357         <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">
358                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
359                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
360                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
361                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
362                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
363                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
364                 </fields>
365                 <links>
366                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
367                 </links>
368                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
369                         <actions>
370                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
371                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
372                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
373                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
374                         </actions>
375                 </permacrud>
376         </class>
377
378         <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">
379                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
380                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
381                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
382                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
383                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
384                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
385                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
386                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
387                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
388                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
389                 </fields>
390                 <links>
391                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
392                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
393             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
394             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
395                 </links>
396                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
397                         <actions>
398                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
399                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
400                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
401                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
402                         </actions>
403                 </permacrud>
404         </class>
405
406         <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">
407                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
408                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
409                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
410                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
411                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
412                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
413                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
414                 </fields>
415                 <links/>
416                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
417                         <actions>
418                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
419                 <retrieve/>
420                 <!--
421                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
422                 -->
423                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
424                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
425                         </actions>
426                 </permacrud>
427         </class>
428
429         <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">
430                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
431                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
432                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
433                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
434                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
435                 </fields>
436                 <links>
437                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
438                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
439                 </links>
440                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
441                         <actions>
442                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
443                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
444                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
445                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
446                         </actions>
447                 </permacrud>
448         </class>
449
450         <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">
451                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
452                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
453                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
454                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
455                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
456                 </fields>
457                 <links>
458                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
459                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
460                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
461                 </links>
462                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
463                         <actions>
464                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
465                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
466                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
467                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
468                         </actions>
469                 </permacrud>
470         </class>
471
472
473         <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">
474                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
475                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
476                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
477                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
478                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
479                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
480                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
481                 </fields>
482                 <links>
483                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
484                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
485                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
486                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
487                 </links>
488         </class>
489
490     <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">
491         <fields oils_persist:primary="id">
492             <field reporter:label="ID" name="id" reporter:datatype="id"/>
493             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
494             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
495             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
496             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
497         </fields>
498         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
499             <actions>
500                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
501                 <retrieve/>
502                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
503                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
504             </actions>
505         </permacrud>
506     </class>
507
508         <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">
509                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
510                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
511                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
512                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
513                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
514                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
515                 </fields>
516                 <links>
517                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
518                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
519                 </links>
520         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
521             <actions>
522                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
523                 <retrieve/>
524                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
525                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
526             </actions>
527         </permacrud>
528         </class>
529
530     <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">
531         <fields oils_persist:primary="name">
532             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
533             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
534             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
535             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
536             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
537             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
538             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
539             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
540             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
541         </fields>
542         <links>
543             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
544         </links>
545         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
546             <actions>
547                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
548                 <retrieve/>
549                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
550                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
551             </actions>
552         </permacrud>
553     </class>
554
555     <class id="cza" controller="open-ils.cstore" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
556         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
557             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
558             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
559             <field reporter:label="Name" name="name" reporter:datatype="text"/>
560             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
561             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
562             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
563             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
564         </fields>
565         <links>
566             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
567         </links>
568     </class>
569
570         <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">
571                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
572                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
573                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
574                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
575                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
576                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
577                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
578                 </fields>
579                 <links>
580             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
581             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
582                 </links>
583                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
584                         <actions>
585                                 <retrieve/>
586                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
587                         </actions>
588                 </permacrud>
589         </class>
590
591         <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">
592                 <fields oils_persist:primary="key">
593                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
594                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
595                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
596                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
597                 </fields>
598                 <links/>
599                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
600                         <actions>
601                                 <create permission="ADMIN_TRIGGER_HOOK" global_required="true"/>
602                                 <retrieve/>
603                                 <update permission="ADMIN_TRIGGER_HOOK" global_required="true"/>
604                                 <delete permission="ADMIN_TRIGGER_HOOK" global_required="true"/>
605                         </actions>
606                 </permacrud>
607         </class>
608
609         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
610                 <fields oils_persist:primary="module">
611                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
612                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
613                 </fields>
614                 <links/>
615         </class>
616
617         <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">
618                 <fields oils_persist:primary="module">
619                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
620                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
621                 </fields>
622                 <links/>
623                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
624                         <actions>
625                                 <create permission="ADMIN_TRIGGER_VALIDATOR" global_required="true"/>
626                                 <retrieve/>
627                                 <update permission="ADMIN_TRIGGER_VALIDATOR" global_required="true"/>
628                                 <delete permission="ADMIN_TRIGGER_VALIDATOR" global_required="true"/>
629                         </actions>
630                 </permacrud>
631         </class>
632
633         <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">
634                 <fields oils_persist:primary="module">
635                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
636                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
637                 </fields>
638                 <links/>
639                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
640                         <actions>
641                                 <create permission="ADMIN_TRIGGER_REACTOR" global_required="true"/>
642                                 <retrieve/>
643                                 <update permission="ADMIN_TRIGGER_REACTOR" global_required="true"/>
644                                 <delete permission="ADMIN_TRIGGER_REACTOR" global_required="true"/>
645                         </actions>
646                 </permacrud>
647         </class>
648
649         <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">
650                 <fields oils_persist:primary="module">
651                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
652                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
653                 </fields>
654                 <links/>
655                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
656                         <actions>
657                                 <create permission="ADMIN_TRIGGER_CLEANUP" global_required="true"/>
658                                 <retrieve/>
659                                 <update permission="ADMIN_TRIGGER_CLEANUP" global_required="true"/>
660                                 <delete permission="ADMIN_TRIGGER_CLEANUP" global_required="true"/>
661                         </actions>
662                 </permacrud>
663         </class>
664
665         <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">
666                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
667                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
668                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
669                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
670                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
671                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
672                 </fields>
673                 <links>
674                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
675                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
676                 </links>
677                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
678                         <actions>
679                                 <create permission="ADMIN_TRIGGER_EVENT_DEF">
680                     <context link="event_def" field="owner"/>
681                 </create>
682                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF">
683                     <context link="event_def" field="owner"/>
684                 </retrieve>
685                                 <update permission="ADMIN_TRIGGER_EVENT_DEF">
686                     <context link="event_def" field="owner"/>
687                 </update>
688                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF">
689                     <context link="event_def" field="owner"/>
690                 </delete>
691                         </actions>
692                 </permacrud>
693         </class>
694
695         <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">
696                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
697                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
698                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
699                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
700                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
701                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
702                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
703                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
704                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
705                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
706                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
707                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
708                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
709                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
710                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
711                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
712                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
713                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
714                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
715                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
716                 </fields>
717                 <links>
718                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
719                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
720                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
721                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
722                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
723                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
724                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
725                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
726                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
727                 </links>
728                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
729                         <actions>
730                                 <create permission="ADMIN_TRIGGER_EVENT_DEF" context_field="owner"/>
731                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF" context_field="owner"/>
732                                 <update permission="ADMIN_TRIGGER_EVENT_DEF" context_field="owner"/>
733                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF" context_field="owner"/>
734                         </actions>
735                 </permacrud>
736         </class>
737
738         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
739                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
740                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
741                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
742                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
743                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
744                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
745                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
746                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
747                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
748                         <field reporter:label="State" name="state" reporter:datatype="text"/>
749                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
750                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
751                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
752                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
753                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
754                 </fields>
755                 <links>
756                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
757                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
758                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
759                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
760                 </links>
761         </class>
762
763         <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">
764                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
765                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
766                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
767                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
768                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
769                 </fields>
770                 <links>
771                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
772                 </links>
773                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
774                         <actions>
775                                 <create permission="ADMIN_TRIGGER_EVENT_DEF">
776                     <context link="event_def" field="owner"/>
777                 </create>
778                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF">
779                     <context link="event_def" field="owner"/>
780                 </retrieve>
781                                 <update permission="ADMIN_TRIGGER_EVENT_DEF">
782                     <context link="event_def" field="owner"/>
783                 </update>
784                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF">
785                     <context link="event_def" field="owner"/>
786                 </delete>
787                         </actions>
788                 </permacrud>
789         </class>
790
791         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
792                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
793                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
794                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
795                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
796                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
797                 </fields>
798                 <links>
799                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
800                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
801                 </links>
802         </class>
803
804         <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">
805                 <fields oils_persist:primary="code">
806                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
807                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
808                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
809                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
810                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
811                 </fields>
812                 <links/>
813         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
814             <actions>
815                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
816                 <retrieve/>
817                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
818                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
819             </actions>
820         </permacrud>
821         </class>
822
823         <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">
824                 <fields oils_persist:primary="code">
825                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
826                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
827                 </fields>
828                 <links/>
829         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
830             <actions>
831                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
832                 <retrieve permission="CREATE_COPY_BTYPE UPDATE_COPY_BTYPE DELETE_COPY_BTYPE" global_required="true"/>
833                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
834                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
835             </actions>
836         </permacrud>
837         </class>
838
839         <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">
840                 <fields oils_persist:primary="code">
841                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
842                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
843                 </fields>
844                 <links/>
845         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
846             <actions>
847                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
848                 <retrieve permission="CREATE_CN_BTYPE UPDATE_CN_BTYPE DELETE_CN_BTYPE" global_required="true"/>
849                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
850                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
851             </actions>
852         </permacrud>
853         </class>
854
855         <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">
856                 <fields oils_persist:primary="code">
857                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
858                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
859                 </fields>
860                 <links/>
861         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
862             <actions>
863                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
864                 <retrieve permission="CREATE_BIB_BTYPE UPDATE_BIB_BTYPE DELETE_BIB_BTYPE" global_required="true"/>
865                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
866                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
867             </actions>
868         </permacrud>
869         </class>
870
871         <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">
872                 <fields oils_persist:primary="code">
873                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
874                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
875                 </fields>
876                 <links/>
877         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
878             <actions>
879                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
880                 <retrieve permission="CREATE_USER_BTYPE UPDATE_USER_BTYPE DELETE_USER_BTYPE" global_required="true"/>
881                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
882                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
883             </actions>
884         </permacrud>
885         </class>
886
887         <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">
888                 <fields oils_persist:primary="code">
889                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
890                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
891                 </fields>
892                 <links/>
893         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
894             <actions>
895                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
896                 <retrieve/>
897                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
898                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
899             </actions>
900         </permacrud>
901         </class>
902
903         <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">
904                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
905                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
906                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
907                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
908                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
909                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
910                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
911                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
912                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
913                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
914                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
915                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
916                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
917                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
918                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
919                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
920                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
921                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
922                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
923                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
924                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
925                 </fields>
926                 <links>
927                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
928                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
929                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
930                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
931                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
932                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
933                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
934                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
935                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
936                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
937                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
938                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
939             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
940                 </links>
941         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
942             <actions>
943                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
944                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
945                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
946                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
947             </actions>
948         </permacrud>
949         </class>
950
951         <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">
952                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
953                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
954                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
955                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
956                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
957                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link"/>
958                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
959                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
960                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
961                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
962                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
963                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
964                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
965                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
966                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
967                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
968                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
969                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
970                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
971                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
972                 </fields>
973                 <links>
974                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
975                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
976                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
977                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
978                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
979                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
980                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
981                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
982                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
983                 </links>
984         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
985             <actions>
986                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
987                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
988                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
989                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
990             </actions>
991         </permacrud>
992         </class>
993
994         <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">
995                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_id_seq">
996                         <field reporter:label="Test ID" name="id" reporter:datatype="id"/>
997                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="link"/>
998                         <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
999                 </fields>
1000                 <links>
1001                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1002                 </links>
1003         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1004             <actions>
1005                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1006                     <context link="matchpoint" field="org_unit"/>
1007                 </create>
1008                 <retrieve/>
1009                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1010                     <context link="matchpoint" field="org_unit"/>
1011                 </update>
1012                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1013                     <context link="matchpoint" field="org_unit"/>
1014                 </delete>
1015             </actions>
1016         </permacrud>
1017         </class>
1018
1019         <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">
1020                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_map_id_seq">
1021                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
1022                         <field reporter:label="Circulation Modifier Subtest ID" name="circ_mod_test" reporter:datatype="link"/>
1023                         <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1024                 </fields>
1025                 <links>
1026                         <link field="circ_mod_test" reltype="has_a" key="id" map="" class="ccmcmt"/>
1027                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1028                 </links>
1029         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1030             <actions>
1031                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1032                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1033                 </create>
1034                 <retrieve/>
1035                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1036                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1037                 </update>
1038                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1039                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1040                 </delete>
1041             </actions>
1042         </permacrud>
1043         </class>
1044
1045         <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">
1046                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1047                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1048                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1049                 </fields>
1050                 <links/>
1051         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1052             <actions>
1053                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1054                 <retrieve/>
1055                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1056                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1057             </actions>
1058         </permacrud>
1059         </class>
1060
1061         <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">
1062                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1063                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1064                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1065                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1066                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1067                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1068                 </fields>
1069                 <links>
1070                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1071                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1072                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1073                 </links>
1074         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1075             <actions>
1076                 <create permission="ADMIN_SURVEY">
1077                     <context link="survey" field="owner"/>
1078                 </create>
1079                 <retrieve/>
1080                 <update permission="ADMIN_SURVEY">
1081                     <context link="survey" field="owner"/>
1082                 </update>
1083                 <delete permission="ADMIN_SURVEY">
1084                     <context link="survey" field="owner"/>
1085                 </delete>
1086             </actions>
1087         </permacrud>
1088         </class>
1089         <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">
1090                 <fields oils_persist:primary="id" oils_persist:sequence="">
1091                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1092                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1093                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1094                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1095                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1096                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1097                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1098                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1099                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1100                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1101                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1102                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1103                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1104                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1105                 </fields>
1106                 <links>
1107                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1108                 </links>
1109         </class>
1110         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1111                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1112                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1113                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1114                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1115                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1116                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1117                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1118                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1119                 </fields>
1120                 <links>
1121                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1122                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1123                 </links>
1124         </class>
1125         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1126                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1127                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1128                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1129                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1130                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1131                 </fields>
1132                 <links>
1133                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1134                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1135                 </links>
1136         </class>
1137         <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">
1138                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1139                         <field name="field" reporter:datatype="link"/>
1140                         <field name="id" reporter:datatype="id" />
1141                         <field name="source" reporter:datatype="link"/>
1142                         <field name="value" reporter:datatype="text"/>
1143                 </fields>
1144                 <links>
1145                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1146                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1147                 </links>
1148         </class>
1149         <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">
1150                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1151                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1152                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1153                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1154                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1155                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1156                 </fields>
1157                 <links>
1158                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1159                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1160                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1161                 </links>
1162         </class>
1163         <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">
1164                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1165                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1166                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1167                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1168                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1169                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1170                 </fields>
1171                 <links>
1172                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1173                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1174                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1175                 </links>
1176         </class>
1177         <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">
1178                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1179                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1180                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1181                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1182                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1183                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1184                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1185                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1186                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1187                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1188                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1189                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1190                 </fields>
1191                 <links>
1192                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1193                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1194                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1195                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1196                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1197                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1198                 </links>
1199         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1200             <actions>
1201                 <create permission="TRANSIT_COPY" context_field="owner">
1202                     <context link="target_copy" field="circ_lib"/>
1203                 </create>
1204                 <retrieve/>
1205                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1206                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1207             </actions>
1208         </permacrud>
1209         </class>
1210         <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">
1211                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1212                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1213                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1214                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1215                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1216                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1217                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1218                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1219                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1220                 </fields>
1221                 <links>
1222                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1223                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1224                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1225                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1226                 </links>
1227         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1228             <actions>
1229                 <create permission="ADMIN_SURVEY">
1230                     <context link="survey" field="owner"/>
1231                 </create>
1232                 <retrieve/>
1233                 <update permission="ADMIN_SURVEY">
1234                     <context link="survey" field="owner"/>
1235                 </update>
1236                 <delete permission="ADMIN_SURVEY">
1237                     <context link="survey" field="owner"/>
1238                 </delete>
1239             </actions>
1240         </permacrud>
1241         </class>
1242         <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">
1243                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
1244                         <field name="bucket" />
1245                         <field name="id" reporter:datatype="id" />
1246                         <field name="target_copy" reporter:datatype="link"/>
1247                         <field name="create_time" reporter:datatype="timestamp" />
1248                         <field name="pos" reporter:datatype="int" />
1249                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
1250                 </fields>
1251                 <links>
1252                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1253                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
1254             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
1255                 </links>
1256         </class>
1257         <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">
1258                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
1259                         <field name="id" reporter:datatype="id" />
1260                         <field name="item" reporter:datatype="link"/>
1261                         <field name="note" reporter:datatype="text" />
1262                 </fields>
1263                 <links>
1264                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
1265                 </links>
1266         </class>
1267         <class id="are" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_entry" oils_persist:tablename="authority.record_entry" reporter:label="Authority Record Entry">
1268                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
1269                         <field name="active" reporter:datatype="bool"/>
1270                         <field name="arn_source" />
1271                         <field name="arn_value" />
1272                         <field name="create_date" reporter:datatype="timestamp"/>
1273                         <field name="creator" />
1274                         <field name="deleted" reporter:datatype="bool"/>
1275                         <field name="edit_date" reporter:datatype="timestamp"/>
1276                         <field name="editor" />
1277                         <field name="id" reporter:datatype="id" />
1278                         <field name="last_xact_id" />
1279                         <field name="marc" />
1280                         <field name="source" />
1281                         <field name="fixed_fields" oils_persist:virtual="true" />
1282                         <field name="notes" oils_persist:virtual="true" />
1283                 </fields>
1284                 <links>
1285                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1286                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1287                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
1288                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
1289                 </links>
1290         </class>
1291         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
1292                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
1293                         <field name="char_encoding" />
1294                         <field name="id" />
1295                         <field name="record" />
1296                         <field name="record_status" />
1297                 </fields>
1298                 <links>
1299                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
1300                 </links>
1301         </class>
1302         <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">
1303                 <fields oils_persist:primary="code" oils_persist:sequence="">
1304                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1305                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1306                 </fields>
1307                 <links/>
1308         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1309             <actions>
1310                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1311                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
1312                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1313                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1314             </actions>
1315         </permacrud>
1316         </class>
1317         <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">
1318                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
1319                         <field name="accepting_usr" />
1320                         <field name="amount" reporter:datatype="money" />
1321                         <field name="amount_collected" reporter:datatype="money" />
1322                         <field name="approval_code" reporter:datatype="text"/>
1323                         <field name="cash_drawer" reporter:datatype="link"/>
1324                         <field name="cc_number" reporter:datatype="text"/>
1325                         <field name="cc_type" reporter:datatype="text"/>
1326                         <field name="cc_processor" reporter:datatype="text"/>
1327                         <field name="expire_month" reporter:datatype="int" />
1328                         <field name="expire_year" reporter:datatype="int" />
1329                         <field name="id" reporter:datatype="id" />
1330                         <field name="note" reporter:datatype="text"/>
1331                         <field name="payment_ts" reporter:datatype="timestamp"/>
1332                         <field name="xact" reporter:datatype="link"/>
1333                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
1334                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
1335                 </fields>
1336                 <links>
1337                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
1338                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
1339                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
1340                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
1341                 </links>
1342         </class>
1343         <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">
1344                 <fields oils_persist:primary="name">
1345                         <field reporter:label="Field Class" name="field_class" />
1346                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1347                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
1348                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
1349                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
1350                 </fields>
1351                 <links/>
1352         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1353             <actions>
1354                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
1355                 <retrieve/>
1356                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
1357                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
1358             </actions>
1359         </permacrud>
1360         </class>
1361         <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">
1362                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
1363                         <field name="field_class" />
1364                         <field name="id" reporter:datatype="id" />
1365                         <field name="name" reporter:datatype="text"/>
1366                         <field name="xpath" reporter:datatype="text"/>
1367                         <field name="weight" reporter:datatype="int" />
1368                         <field name="format" reporter:datatype="link"/>
1369                         <field name="search_field" reporter:datatype="bool" />
1370                         <field name="facet_field" reporter:datatype="bool" />
1371                 </fields>
1372                 <links/>
1373         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1374             <actions>
1375                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
1376                 <retrieve/>
1377                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
1378                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
1379             </actions>
1380         </permacrud>
1381         </class>
1382         <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">
1383                 <fields oils_persist:primary="code" oils_persist:sequence="">
1384                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1385                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1386                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1387                 </fields>
1388                 <links/>
1389         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1390             <actions>
1391                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1392                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
1393                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1394                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1395             </actions>
1396         </permacrud>
1397         </class>
1398         <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">
1399                 <fields oils_persist:primary="code" oils_persist:sequence="">
1400                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1401                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1402                 </fields>
1403                 <links/>
1404         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1405             <actions>
1406                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1407                 <retrieve/>
1408                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1409                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1410             </actions>
1411         </permacrud>
1412         </class>
1413         <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">
1414                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
1415                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
1416                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
1417                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
1418                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
1419                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
1420                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
1421                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
1422                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
1423                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1424                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
1425                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1426                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
1427                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
1428                 </fields>
1429                 <links>
1430                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1431                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1432                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
1433                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1434                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
1435                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
1436                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
1437                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
1438                 </links>
1439         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1440             <actions>
1441                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
1442                 <retrieve/>
1443                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
1444                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
1445             </actions>
1446         </permacrud>
1447         </class>
1448         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
1449                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
1450                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
1451                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
1452                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1453                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
1454                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1455                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
1456                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
1457                 </fields>
1458                 <links>
1459                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
1460                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
1461         </links>
1462         </class>
1463         <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">
1464                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
1465                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1466                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
1467                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
1468                 </fields>
1469                 <links>
1470                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
1471                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
1472                 </links>
1473         </class>
1474         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
1475                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
1476                         <field name="id" reporter:datatype="id" />
1477                         <field name="value" oils_persist:i18n="true" />
1478                 </fields>
1479                 <links/>
1480         </class>
1481         <class id="mous" controller="open-ils.cstore" oils_obj:fieldmapper="money::open_user_summary" oils_persist:tablename="money.open_usr_summary" reporter:label="Open User Summary">
1482                 <fields oils_persist:primary="usr" oils_persist:sequence="">
1483                         <field name="balance_owed" reporter:datatype="money" />
1484                         <field name="total_owed" reporter:datatype="money" />
1485                         <field name="total_paid" reporter:datatype="money" />
1486                         <field name="usr" reporter:datatype="link"/>
1487                 </fields>
1488                 <links/>
1489         </class>
1490         <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">
1491                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
1492                         <field name="collector" />
1493                         <field name="enter_time" reporter:datatype="timestamp"/>
1494                         <field name="id" reporter:datatype="id" />
1495                         <field name="location" reporter:datatype="link"/>
1496                         <field name="usr" reporter:datatype="link"/>
1497                 </fields>
1498                 <links>
1499                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1500                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
1501                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
1502                 </links>
1503         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1504             <actions>
1505                 <create permission="money.collections_tracker.create" context_field="location"/>
1506                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
1507                 <delete permission="money.collections_tracker.create" context_field="location"/>
1508             </actions>
1509         </permacrud>
1510         </class>
1511         <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">
1512                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
1513                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
1514                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
1515                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
1516                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1517                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
1518                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
1519                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
1520                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
1521                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
1522                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
1523                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
1524                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
1525                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
1526                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
1527                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
1528                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
1529                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
1530                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
1531                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1532                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1533                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1534                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1535                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1536                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1537                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1538                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
1539                 </fields>
1540                 <links>
1541                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1542                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1543                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
1544                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
1545                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
1546                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
1547                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
1548                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
1549                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
1550                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
1551                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
1552                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
1553                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
1554                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
1555                 </links>
1556         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1557             <actions>
1558                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
1559                 <retrieve/>
1560                 <update permission="UPDATE_MARC" global_required="true"/>
1561             </actions>
1562         </permacrud>
1563         </class>
1564         <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">
1565                 <fields oils_persist:primary="id" oils_persist:sequence="">
1566                         <field name="dow_0_close" />
1567                         <field name="dow_0_open" />
1568                         <field name="dow_1_close" />
1569                         <field name="dow_1_open" />
1570                         <field name="dow_2_close" />
1571                         <field name="dow_2_open" />
1572                         <field name="dow_3_close" />
1573                         <field name="dow_3_open" />
1574                         <field name="dow_4_close" />
1575                         <field name="dow_4_open" />
1576                         <field name="dow_5_close" />
1577                         <field name="dow_5_open" />
1578                         <field name="dow_6_close" />
1579                         <field name="dow_6_open" />
1580                         <field name="id" reporter:datatype="id" />
1581                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
1582                 </fields>
1583                 <links>
1584                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
1585                 </links>
1586         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1587             <actions>
1588                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
1589                 <retrieve/>
1590                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
1591                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
1592             </actions>
1593         </permacrud>
1594         </class>
1595         <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">
1596                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
1597                         <field name="close_end" reporter:datatype="timestamp" />
1598                         <field name="close_start" reporter:datatype="timestamp" />
1599                         <field name="id" reporter:datatype="id" />
1600                         <field name="org_unit" reporter:datatype="org_unit"/>
1601                         <field name="reason" reporter:datatype="text"/>
1602                 </fields>
1603                 <links>
1604                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1605                 </links>
1606         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1607             <actions>
1608                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1609                 <retrieve/>
1610                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1611                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1612             </actions>
1613         </permacrud>
1614         </class>
1615         <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">
1616                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
1617                         <field name="extended" reporter:datatype="interval"/>
1618                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
1619                         <field name="max_renewals" reporter:datatype="int" />
1620                         <field name="name" reporter:datatype="text"/>
1621                         <field name="normal" reporter:datatype="interval"/>
1622                         <field name="shrt" reporter:datatype="interval"/>
1623                 </fields>
1624                 <links>
1625                 </links>
1626         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1627             <actions>
1628                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
1629                 <retrieve/>
1630                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
1631                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
1632             </actions>
1633         </permacrud>
1634         </class>
1635         <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">
1636                 <fields oils_persist:primary="id" oils_persist:sequence="">
1637                         <field name="balance_owed" reporter:datatype="money"/>
1638                         <field name="id" reporter:datatype="id" />
1639                         <field name="last_billing_note" reporter:datatype="text"/>
1640                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
1641                         <field name="last_billing_type" reporter:datatype="text"/>
1642                         <field name="last_payment_note" reporter:datatype="text"/>
1643                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
1644                         <field name="last_payment_type" reporter:datatype="text"/>
1645                         <field name="total_owed" reporter:datatype="money"/>
1646                         <field name="total_paid" reporter:datatype="money"/>
1647                         <field name="usr" reporter:datatype="link"/>
1648                         <field name="xact_finish" reporter:datatype="timestamp" />
1649                         <field name="xact_start" reporter:datatype="timestamp" />
1650                         <field name="xact_type" reporter:datatype="text"/>
1651                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
1652                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
1653                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
1654                         <field name="billing_location" reporter:datatype="link"/>
1655                 </fields>
1656                 <links>
1657                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1658                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
1659                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
1660                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
1661                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1662                 </links>
1663         </class>
1664         <class id="au" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
1665                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
1666                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
1667                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
1668                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
1669                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
1670                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
1671                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
1672                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
1673                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1674                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
1675                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
1676                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
1677                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1678                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
1679                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
1680                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
1681                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
1682                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
1683                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
1684                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1685                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
1686                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
1687                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
1688                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
1689                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
1690                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
1691                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
1692                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
1693                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
1694                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
1695                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
1696                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
1697                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
1698                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
1699                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
1700                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
1701                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
1702                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
1703                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
1704                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
1705                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
1706                         <field reporter:label="Prefix" name="prefix"  reporter:datatype="text"/>
1707                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
1708                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
1709                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
1710                         <field reporter:label="Suffix/Title" name="suffix"  reporter:datatype="text"/>
1711                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
1712                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
1713                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
1714                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
1715                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
1716                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
1717                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
1718                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1719                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
1720                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
1721                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
1722                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
1723                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
1724                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1725                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
1726                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
1727                 </fields>
1728                 <links>
1729                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
1730                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
1731                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
1732                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
1733                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
1734                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
1735                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
1736                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
1737                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
1738                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
1739                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
1740                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
1741                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
1742                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
1743                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
1744                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
1745                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
1746                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
1747                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
1748                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
1749                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
1750                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
1751                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
1752                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
1753                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
1754                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
1755                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
1756                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
1757                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
1758                 </links>
1759         </class>
1760
1761         <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">
1762                 <fields oils_persist:primary="name">
1763                         <field name="name" reporter:datatype="text"/>
1764                         <field name="label" reporter:datatype="text"/>
1765                         <field name="description" reporter:datatype="text"/>
1766                         <field name="datatype" reporter:datatype="text"/>
1767                         <field name="fm_class" reporter:datatype="text"/>
1768                 </fields>
1769                 <links>
1770                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
1771                 </links>
1772                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1773                         <actions>
1774                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
1775                                 <retrieve/>
1776                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
1777                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
1778                         </actions>
1779                 </permacrud>
1780         </class>
1781         <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">
1782                 <fields oils_persist:primary="name">
1783                         <field name="name" reporter:datatype="text"/>
1784                         <field name="label" reporter:datatype="text"/>
1785                         <field name="description" reporter:datatype="text"/>
1786                         <field name="datatype" reporter:datatype="text"/>
1787                         <field name="view_perm" reporter:datatype="link"/>
1788                         <field name="update_perm" reporter:datatype="link"/>
1789                         <field name="fm_class" reporter:datatype="text"/>
1790                 </fields>
1791                 <links>
1792                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
1793                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
1794                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
1795                 </links>
1796                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1797                         <actions>
1798                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
1799                                 <retrieve/>
1800                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
1801                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
1802                         </actions>
1803                 </permacrud>
1804         </class>
1805         <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">
1806                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
1807                         <field name="id" />
1808                         <field name="name"  reporter:datatype="text"/>
1809                         <field name="org_unit" reporter:datatype="org_unit"/>
1810                         <field name="value"  reporter:datatype="text"/>
1811                 </fields>
1812                 <links>
1813                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1814                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
1815                 </links>
1816         </class>
1817         <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">
1818                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
1819                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1820                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
1821                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1822                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
1823                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1824                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
1825                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
1826                 </fields>
1827                 <links>
1828                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
1829                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1830                 </links>
1831         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1832             <actions>
1833                 <create permission="CREATE_COPY_NOTE">
1834                     <context link="owning_copy" field="circ_lib"/>
1835                 </create>
1836                 <retrieve permission="VIEW_COPY_NOTES">
1837                     <context link="owning_copy" field="circ_lib"/>
1838                 </retrieve>
1839                 <update permission="UPDATE_COPY_NOTE">
1840                     <context link="owning_copy" field="circ_lib"/>
1841                 </update>
1842                 <delete permission="DELETE_COPY_NOTE">
1843                     <context link="owning_copy" field="circ_lib"/>
1844                 </delete>
1845             </actions>
1846         </permacrud>
1847         </class>
1848         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
1849                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
1850                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
1851                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
1852                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
1853                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
1854                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
1855                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
1856                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
1857                 </fields>
1858                 <links>
1859                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
1860                 </links>
1861         </class>
1862         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
1863                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
1864                         <field name="fingerprint"  reporter:datatype="text"/>
1865                         <field name="id" reporter:datatype="id" />
1866                         <field name="master_record" reporter:datatype="link"/>
1867                         <field name="mods"  reporter:datatype="text"/>
1868                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
1869                 </fields>
1870                 <links>
1871                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
1872                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
1873                 </links>
1874         </class>
1875         <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">
1876                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
1877                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
1878                         <field name="name"  reporter:datatype="text"/>
1879                 </fields>
1880                 <links/>
1881         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1882             <actions>
1883                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
1884                 <retrieve/>
1885                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
1886                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
1887             </actions>
1888         </permacrud>
1889         </class>
1890         <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">
1891                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
1892                         <field name="code"  reporter:datatype="text"/>
1893                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
1894                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
1895                 </fields>
1896                 <links/>
1897         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1898             <actions>
1899                 <create permission="CREATE_PERM" global_required="true"/>
1900                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
1901                 <update permission="UPDATE_PERM" global_required="true"/>
1902                 <delete permission="DELETE_PERM" global_required="true"/>
1903             </actions>
1904         </permacrud>
1905         </class>
1906         <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">
1907                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
1908                         <field name="id" reporter:datatype="id" />
1909                         <field name="metarecord" reporter:datatype="link"/>
1910                         <field name="source" reporter:datatype="link"/>
1911                 </fields>
1912                 <links>
1913                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1914                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
1915                 </links>
1916         </class>
1917         <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">
1918                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
1919                         <field name="field" reporter:datatype="link"/>
1920                         <field name="id" reporter:datatype="id" />
1921                         <field name="source" reporter:datatype="link"/>
1922                         <field name="value"  reporter:datatype="text"/>
1923                 </fields>
1924                 <links>
1925                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1926                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1927                 </links>
1928         </class>
1929         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
1930                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
1931                         <field name="accepting_usr" reporter:datatype="link"/>
1932                         <field name="amount" reporter:datatype="money" />
1933                         <field name="amount_collected" reporter:datatype="money" />
1934                         <field name="cash_drawer" reporter:datatype="link"/>
1935                         <field name="id" reporter:datatype="id" />
1936                         <field name="note"  reporter:datatype="text"/>
1937                         <field name="payment_ts" reporter:datatype="timestamp"/>
1938                         <field name="xact" reporter:datatype="link"/>
1939                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
1940                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
1941                 </fields>
1942                 <links>
1943                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
1944                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
1945                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
1946                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
1947                 </links>
1948         </class>
1949         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
1950                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
1951                         <field name="accepting_usr" reporter:datatype="link"/>
1952                         <field name="amount" reporter:datatype="money" />
1953                         <field name="amount_collected" reporter:datatype="money" />
1954                         <field name="id" reporter:datatype="id" />
1955                         <field name="note"  reporter:datatype="text"/>
1956                         <field name="payment_ts" reporter:datatype="timestamp"/>
1957                         <field name="xact" reporter:datatype="link"/>
1958                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
1959                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
1960                 </fields>
1961                 <links>
1962                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
1963                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
1964                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
1965                 </links>
1966         </class>
1967         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
1968                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
1969                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
1970                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
1971                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
1972                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
1973                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
1974                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
1975                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
1976                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
1977                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
1978                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
1979                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
1980                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
1981                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
1982                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
1983                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
1984                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
1985                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
1986                 </fields>
1987                 <links>
1988                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
1989                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
1990                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
1991                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1992                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
1993                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
1994                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
1995                 </links>
1996         </class>
1997
1998         <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">
1999                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
2000                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2001                         <field name="name"  reporter:datatype="text"/>
2002                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
2003                         <field name="block_list" reporter:datatype="text"/>
2004                         <field name="org_depth" reporter:datatype="int"/>
2005                 </fields>
2006                 <links/>
2007         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2008             <actions>
2009                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2010                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
2011                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2012                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2013             </actions>
2014         </permacrud>
2015         </class>
2016         <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">
2017                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
2018                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
2019                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
2020                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
2021                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
2022                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
2023                 </fields>
2024                 <links>
2025                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
2026                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
2027                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2028         </links>
2029         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2030             <actions>
2031                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2032                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2033                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2034                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2035             </actions>
2036         </permacrud>
2037         </class>
2038         <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">
2039                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
2040                         <field name="holdable" reporter:datatype="bool"/>
2041                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2042                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2043                         <field name="opac_visible" reporter:datatype="bool"/>
2044                 </fields>
2045                 <links/>
2046         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2047             <actions>
2048                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
2049                 <retrieve permission="CREATE_COPY_STATUS UPDATE_COPY_STATUS DELETE_COPY_STATUS" global_required="true"/>
2050                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
2051                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
2052             </actions>
2053         </permacrud>
2054         </class>
2055         <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">
2056                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
2057                         <field name="id" reporter:datatype="id" reporter:label="ID" />
2058                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
2059                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
2060                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
2061                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
2062                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
2063                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
2064                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
2065                 </fields>
2066                 <links>
2067                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2068                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2069                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2070                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
2071                 </links>
2072                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2073                         <actions>
2074                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
2075                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
2076                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
2077                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
2078                         </actions>
2079                 </permacrud>
2080         </class>
2081         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
2082                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
2083                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
2084                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
2085                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
2086                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
2087                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
2088                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
2089                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
2090                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
2091                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
2092                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2093                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
2094                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
2095                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
2096                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
2097                 </fields>
2098                 <links>
2099                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2100                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
2101                 </links>
2102         </class>
2103         <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">
2104                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
2105                         <field name="call_number" />
2106                         <field name="create_date" reporter:datatype="timestamp"/>
2107                         <field name="creator" reporter:datatype="link"/>
2108                         <field name="id" reporter:datatype="id" />
2109                         <field name="pub" reporter:datatype="bool"/>
2110                         <field name="title"  reporter:datatype="text"/>
2111                         <field name="value"  reporter:datatype="text"/>
2112                 </fields>
2113                 <links>
2114                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2115                 </links>
2116         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2117             <actions>
2118                 <create permission="CREATE_VOLUME_NOTE">
2119                     <context link="call_number" field="owning_lib"/>
2120                 </create>
2121                 <retrieve permission="VIEW_VOLUME_NOTES">
2122                     <context link="call_number" field="owning_lib"/>
2123                 </retrieve>
2124                 <update permission="UPDATE_VOLUME_NOTE">
2125                     <context link="call_number" field="owning_lib"/>
2126                 </update>
2127                 <delete permission="DELETE_VOLUME_NOTE">
2128                     <context link="call_number" field="owning_lib"/>
2129                 </delete>
2130             </actions>
2131         </permacrud>
2132         </class>
2133         <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">
2134                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
2135                         <field name="create_date" reporter:datatype="timestamp"/>
2136                         <field name="creator" reporter:datatype="link"/>
2137                         <field name="edit_date" reporter:datatype="timestamp"/>
2138                         <field name="editor" reporter:datatype="link"/>
2139                         <field name="id" reporter:datatype="id" />
2140                         <field name="record" reporter:datatype="link"/>
2141                         <field name="value" reporter:datatype="text"/>
2142                 </fields>
2143                 <links>
2144                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2145                 </links>
2146         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2147             <actions>
2148                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2149                 <retrieve permission="VIEW_AUTHORITY_RECORD_NOTES" global_required='true'/>
2150                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2151                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2152             </actions>
2153         </permacrud>
2154         </class>
2155         <class id="circ" controller="open-ils.cstore" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
2156                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2157                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2158                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2159                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2160                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2161                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2162                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2163                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2164                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2165                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2166                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2167                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2168                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2169                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2170                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2171                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2172                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2173                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2174                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2175                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2176                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2177                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2178                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
2179                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2180                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2181                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2182                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2183                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
2184                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
2185                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
2186                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2187                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2188                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2189                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2190                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2191                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2192                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
2193                 </fields>
2194                 <links>
2195                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2196                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2197                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2198                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2199                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2200                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2201                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2202                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2203                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2204                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2205                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2206                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2207                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2208                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2209                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2210                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2211                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
2212                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
2213                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
2214                 </links>
2215         </class>
2216         <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">
2217                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2218                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2219                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2220                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2221                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2222                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2223                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2224                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2225                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2226                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2227                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2228                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2229                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2230                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2231                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2232                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2233                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2234                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2235                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2236                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2237                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2238                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2239                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
2240                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2241                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2242                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2243                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2244                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2245                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2246                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2247                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2248                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2249                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
2250                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
2251                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
2252                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
2253                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
2254                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
2255                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
2256                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
2257                 </fields>
2258                 <links>
2259                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2260                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2261                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2262                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2263                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2264                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2265                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2266                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2267                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2268                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2269                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2270                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2271                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2272                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2273                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
2274                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2275                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2276                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2277                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
2278                 </links>
2279         </class>
2280         <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">
2281                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2282                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2283                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2284                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2285                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2286                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2287                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2288                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2289                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2290                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2291                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2292                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2293                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2294                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2295                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2296                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2297                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2298                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2299                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2300                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2301                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2302                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2303                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
2304                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2305                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2306                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2307                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2308                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
2309                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
2310                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
2311                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2312                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2313                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2314                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2315                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2316                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2317                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
2318                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
2319                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
2320                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
2321                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
2322                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
2323                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
2324                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
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="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2333                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2334                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2335                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2336                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2337                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2338                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2339                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2340                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2341                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
2342                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2343                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2344                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2345                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
2346                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2347                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
2348                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
2349                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
2350                 </links>
2351         </class>
2352
2353         <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">
2354                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
2355                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id"/>
2356                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
2357                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2358                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
2359                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
2360                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2361                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
2362                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
2363                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
2364                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
2365                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2366                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
2367                 </fields>
2368                 <links>
2369                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2370                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2371                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
2372                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
2373                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
2374                 </links>
2375                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2376                         <actions>
2377                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2378                                 <retrieve />
2379                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2380                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2381                         </actions>
2382                 </permacrud>
2383         </class>
2384
2385         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
2386                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
2387                         <field reporter:label="Resource ID" name="id" reporter:datatype="id"/>
2388                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2389                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
2390                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
2391                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
2392                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
2393                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
2394                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
2395                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2396                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
2397                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
2398                 </fields>
2399                 <links>
2400                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2401                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
2402                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
2403                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
2404                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
2405                 </links>
2406                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2407                         <actions>
2408                                 <create permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
2409                                 <retrieve />
2410                                 <update permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
2411                                 <delete permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
2412                         </actions>
2413                 </permacrud>
2414         </class>
2415         
2416         <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">
2417                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
2418                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id"/>
2419                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2420                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
2421                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
2422                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
2423                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
2424                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2425                 </fields>
2426                 <links>
2427                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2428                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
2429                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
2430                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
2431                 </links>
2432                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2433                         <actions>
2434                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
2435                                 <retrieve />
2436                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
2437                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
2438                         </actions>
2439                 </permacrud>
2440         </class>
2441         
2442         <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">
2443                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
2444                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id"/>
2445                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2446                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
2447                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
2448                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2449                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2450                 </fields>
2451                 <links>
2452                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2453                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
2454                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
2455                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
2456                 </links>
2457                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2458                         <actions>
2459                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
2460                                 <retrieve />
2461                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
2462                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
2463                         </actions>
2464                 </permacrud>
2465         </class>
2466         
2467         <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">
2468                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
2469                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
2470                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
2471                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
2472                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
2473                 </fields>
2474                 <links>
2475                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
2476                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
2477                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
2478                 </links>
2479                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2480                         <actions>
2481                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
2482                                 <retrieve />
2483                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
2484                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
2485                         </actions>
2486                 </permacrud>
2487         </class>
2488         
2489         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
2490                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2491                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
2492                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2493                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
2494                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
2495                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
2496                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2497                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2498                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2499                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2500                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
2501                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2502                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
2503                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
2504                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
2505                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
2506                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
2507                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
2508                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
2509                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2510                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
2511                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
2512                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
2513                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
2514                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
2515                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
2516                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
2517                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
2518                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2519                 </fields>
2520                 <links>
2521                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2522                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2523                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2524                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2525                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2526                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
2527                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
2528                         <link field="target_resource" reltype="might_have" key="id" map="" class="brsrc"/>
2529                         <link field="current_resource" reltype="might_have" key="id" map="" class="brsrc"/>
2530                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
2531                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
2532                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
2533                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
2534                 </links>
2535                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2536                         <actions>
2537                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
2538                                 <retrieve />
2539                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
2540                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
2541                         </actions>
2542                 </permacrud>
2543         </class>
2544         
2545         <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">
2546                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
2547                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
2548                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
2549                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
2550                 </fields>
2551                 <links>
2552                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
2553                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
2554                 </links>
2555                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2556                         <actions>
2557                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
2558                                 <retrieve />
2559                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
2560                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
2561                         </actions>
2562                 </permacrud>
2563         </class>
2564
2565         <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">
2566                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
2567                         <field name="bucket" reporter:datatype="link"/>
2568                         <field name="id" reporter:datatype="id" />
2569                         <field name="target_call_number" reporter:datatype="link" />
2570                         <field name="create_time" reporter:datatype="timestamp" />
2571                         <field name="pos" reporter:datatype="int" />
2572                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2573                 </fields>
2574                 <links>
2575                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
2576                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
2577             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
2578                 </links>
2579         </class>
2580         <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">
2581                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
2582                         <field name="id" reporter:datatype="id" />
2583                         <field name="item" reporter:datatype="link"/>
2584                         <field name="note" reporter:datatype="text" />
2585                 </fields>
2586                 <links>
2587                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
2588                 </links>
2589         </class>
2590         <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">
2591                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
2592                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
2593                         <field name="btype" reporter:datatype="text"/>
2594                         <field name="id" reporter:datatype="id" />
2595                         <field name="name" reporter:datatype="text"/>
2596                         <field name="owner" reporter:datatype="link"/>
2597                         <field name="pub" reporter:datatype="bool"/>
2598                         <field name="create_time" reporter:datatype="timestamp" />
2599                 </fields>
2600                 <links>
2601                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
2602                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
2603                 </links>
2604         </class>
2605         <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">
2606                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
2607                         <field name="id" reporter:datatype="id" />
2608                         <field name="bucket" reporter:datatype="link"/>
2609                         <field name="note" reporter:datatype="text" />
2610                 </fields>
2611                 <links>
2612                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
2613                 </links>
2614         </class>
2615         <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">
2616                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
2617                         <field name="hold" reporter:datatype="link"/>
2618                         <field name="id" reporter:datatype="id" />
2619                         <field name="target_copy" reporter:datatype="link"/>
2620                 </fields>
2621                 <links>
2622                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
2623                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2624                 </links>
2625         </class>
2626         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
2627                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
2628                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
2629                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
2630                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
2631                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
2632                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
2633                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
2634                 </fields>
2635                 <links>
2636                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
2637                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
2638                 </links>
2639         </class>
2640         <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">
2641                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
2642                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
2643                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
2644                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
2645                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2646                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2647                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
2648                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
2649                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
2650                 </fields>
2651                 <links>
2652                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2653                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
2654                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
2655                 </links>
2656         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2657             <actions>
2658                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
2659                 <retrieve/>
2660                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
2661                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
2662             </actions>
2663         </permacrud>
2664         </class>
2665
2666     <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">
2667         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
2668             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
2669             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
2670             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
2671             <field reporter:label="Position" name="position" reporter:datatype="int"/>
2672         </fields>
2673         <links>
2674             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
2675             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
2676         </links>
2677         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2678             <actions>
2679                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
2680                 <retrieve/>
2681                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
2682                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
2683             </actions>
2684         </permacrud>
2685     </class>
2686
2687         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
2688                 <fields>
2689                         <field name="id" oils_persist:virtual="true" />
2690                         <field name="location" oils_persist:virtual="true" />
2691                         <field name="owning_lib" oils_persist:virtual="true" />
2692                         <field name="holdings" oils_persist:virtual="true" />
2693                         <field name="current_holdings" oils_persist:virtual="true" />
2694                         <field name="supplements" oils_persist:virtual="true" />
2695                         <field name="current_supplements" oils_persist:virtual="true" />
2696                         <field name="indexes" oils_persist:virtual="true" />
2697                         <field name="current_indexes" oils_persist:virtual="true" />
2698                         <field name="online" oils_persist:virtual="true" />
2699                         <field name="missing" oils_persist:virtual="true" />
2700                         <field name="incomplete" oils_persist:virtual="true" />
2701                 </fields>
2702         </class>
2703         <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">
2704                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
2705                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
2706                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2707                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
2708                         <field reporter:label="Creator" name="creator" />
2709                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2710                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
2711                         <field reporter:label="Editor" name="editor" />
2712                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2713                         <field reporter:label="Last Transaction ID" name="last_xact_id" />
2714                         <field reporter:label="MARC" name="marc" />
2715                         <field reporter:label="Source" name="source" />
2716                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
2717                 </fields>
2718                 <links>
2719                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2720                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2721                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2722                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2723                 </links>
2724                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2725                         <actions>
2726                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
2727                                 <retrieve/>
2728                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
2729                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
2730                         </actions>
2731                 </permacrud>
2732         </class>
2733         <class id="ssub" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
2734                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
2735                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
2736                         <field reporter:label="Call Number" name="call_number" reporter:datatype="link"/>
2737                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
2738                         <field reporter:label="Start date" name="start_date" reporter:datatype="timestamp"/>
2739                         <field reporter:label="End date" name="end_date" reporter:datatype="timestamp"/>
2740                 </fields>
2741                 <links>
2742                         <link field="call_number" reltype="might_have" key="id" map="" class="acn"/>
2743                         <link field="uri" reltype="might_have" key="id" map="" class="auri"/>
2744                 </links>
2745         </class>
2746         <class id="sbu" controller="open-ils.cstore" oils_obj:fieldmapper="serial::binding_unit" oils_persist:tablename="serial.binding_unit" reporter:label="Binding Unit">
2747                 <fields oils_persist:primary="id" oils_persist:sequence="serial.binding_unit_id_seq">
2748                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
2749                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
2750                         <field reporter:label="Label" name="label" />
2751                 </fields>
2752                 <links>
2753                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2754                 </links>
2755         </class>
2756         <class id="siss" controller="open-ils.cstore" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
2757                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
2758                         <field name="id" reporter:datatype="id" />
2759                         <field name="subscription" reporter:datatype="link"/>
2760                         <field name="target_copy" reporter:datatype="link"/>
2761                         <field name="location" reporter:datatype="link"/>
2762                         <field name="binding_unit" reporter:datatype="link"/>
2763                         <field name="label" />
2764                 </fields>
2765                 <links>
2766                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2767                         <link field="target_copy" reltype="might_have" key="id" map="" class="acp"/>
2768                         <link field="location" reltype="might_have" key="id" map="" class="acpl"/>
2769                         <link field="binding_unit" reltype="might_have" key="id" map="" class="sbu"/>
2770                 </links>
2771         </class>
2772         <class id="sbsum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::bib_summary" oils_persist:tablename="serial.bib_summary" reporter:label="Bib Summary">
2773                 <fields oils_persist:primary="id" oils_persist:sequence="serial.bib_summary_id_seq">
2774                         <field name="id" reporter:datatype="id" />
2775                         <field name="subscription" reporter:datatype="link"/>
2776                         <field name="generated_coverage" reporter:datatype="text"/>
2777                         <field name="textual_holdings" reporter:datatype="text"/>
2778                 </fields>
2779                 <links>
2780                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2781                 </links>
2782         </class>
2783         <class id="sssum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::sup_summary" oils_persist:tablename="serial.sup_summary" reporter:label="Supplemental Issue Summary">
2784                 <fields oils_persist:primary="id" oils_persist:sequence="serial.sup_summary_id_seq">
2785                         <field name="id" reporter:datatype="id" />
2786                         <field name="subscription" reporter:datatype="link"/>
2787                         <field name="generated_coverage" reporter:datatype="text"/>
2788                         <field name="textual_holdings" reporter:datatype="text"/>
2789                 </fields>
2790                 <links>
2791                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2792                 </links>
2793         </class>
2794         <class id="sisum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::index_summary" oils_persist:tablename="serial.index_summary" reporter:label="Index Summary">
2795                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
2796                         <field name="id" reporter:datatype="id" />
2797                         <field name="subscription" reporter:datatype="link"/>
2798                         <field name="generated_coverage" reporter:datatype="text"/>
2799                         <field name="textual_holdings" reporter:datatype="text"/>
2800                 </fields>
2801                 <links>
2802                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2803                 </links>
2804         </class>
2805
2806         <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">
2807                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
2808                         <field name="id" reporter:datatype="id" />
2809                         <field name="owning_copy" reporter:datatype="link"/>
2810                         <field name="stat_cat" reporter:datatype="link"/>
2811                         <field name="stat_cat_entry" reporter:datatype="link"/>
2812                 </fields>
2813                 <links>
2814                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2815                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
2816                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
2817                 </links>
2818         </class>
2819         <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">
2820                 <fields oils_persist:primary="code">
2821                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2822                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2823                 </fields>
2824                 <links/>
2825         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2826             <actions>
2827                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2828                 <retrieve/>
2829                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2830                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2831             </actions>
2832         </permacrud>
2833         </class>
2834         <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">
2835                 <fields oils_persist:primary="code">
2836                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
2837                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2838                 </fields>
2839                 <links/>
2840         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2841             <actions>
2842                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2843                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
2844                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2845                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2846             </actions>
2847         </permacrud>
2848         </class>
2849         <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">
2850                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
2851                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
2852                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
2853                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
2854                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
2855                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
2856                 </fields>
2857                 <links>
2858             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2859         </links>
2860         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2861             <actions>
2862                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
2863                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
2864                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
2865                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
2866             </actions>
2867         </permacrud>
2868         </class>
2869         <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">
2870                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
2871                         <field name="id" reporter:datatype="id" />
2872                         <field name="name" reporter:datatype="text"/>
2873                 </fields>
2874                 <links/>
2875         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2876             <actions>
2877                 <create permission="CREATE_LASSO" global_required="true"/>
2878                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
2879                 <update permission="UPDATE_LASSO" global_required="true"/>
2880                 <delete permission="DELETE_LASSO" global_required="true"/>
2881             </actions>
2882         </permacrud>
2883         </class>
2884         <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">
2885                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
2886                         <field name="id" reporter:datatype="id" />
2887                         <field name="lasso" reporter:datatype="link"/>
2888                         <field name="org_unit" reporter:datatype="org_unit"/>
2889                 </fields>
2890                 <links>
2891                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
2892                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2893                 </links>
2894         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2895             <actions>
2896                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
2897                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
2898                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
2899                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
2900             </actions>
2901         </permacrud>
2902         </class>
2903         <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">
2904                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
2905                         <field name="id" reporter:datatype="id" />
2906                         <field name="from_org" reporter:datatype="org_unit"/>
2907                         <field name="to_org" reporter:datatype="org_unit"/>
2908                         <field name="prox" reporter:datatype="int" />
2909                 </fields>
2910                 <links>
2911                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
2912                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
2913                 </links>
2914         </class>
2915         <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">
2916                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
2917                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2918                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
2919                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
2920                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
2921                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
2922                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
2923                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
2924                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
2925                 </fields>
2926                 <links/>
2927         </class>
2928         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
2929                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
2930                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
2931                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2932                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2933                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
2934                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
2935                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2936                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
2937                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2938                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
2939                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
2940                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
2941                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
2942                 </fields>
2943                 <links>
2944                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2945                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
2946                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
2947                 </links>
2948         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2949             <actions>
2950                 <create permission="ADMIN_SURVEY" context_field="owner"/>
2951                 <retrieve/>
2952                 <update permission="ADMIN_SURVEY" context_field="owner"/>
2953                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
2954             </actions>
2955         </permacrud>
2956         </class>
2957         <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">
2958                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
2959                         <field name="address_type"  reporter:datatype="text"/>
2960                         <field name="city"  reporter:datatype="text"/>
2961                         <field name="country"  reporter:datatype="text"/>
2962                         <field name="county"  reporter:datatype="text"/>
2963                         <field name="id" reporter:datatype="id" />
2964                         <field name="org_unit" reporter:datatype="org_unit"/>
2965                         <field name="post_code"  reporter:datatype="text"/>
2966                         <field name="state"  reporter:datatype="text"/>
2967                         <field name="street1"  reporter:datatype="text"/>
2968                         <field name="street2"  reporter:datatype="text"/>
2969                         <field name="valid" reporter:datatype="bool"/>
2970                 </fields>
2971                 <links>
2972                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2973                 </links>
2974         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2975             <actions>
2976                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
2977                 <retrieve/>
2978                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
2979                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
2980             </actions>
2981         </permacrud>
2982         </class>
2983         <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">
2984                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
2985                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
2986                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
2987                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
2988                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
2989                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
2990                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
2991                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
2992                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
2993                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
2994                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
2995                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
2996                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
2997                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
2998                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
2999                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
3000                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
3001                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
3002                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
3003                         <field reporter:label="Item Selection Depth" name="selection_depth" />
3004                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
3005                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
3006                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
3007                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
3008                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
3009                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
3010                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
3011                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
3012                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
3013                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
3014                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
3015                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
3016                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
3017                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
3018                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
3019                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
3020                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
3021                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
3022                 </fields>
3023                 <links>
3024                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
3025                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
3026                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
3027                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
3028                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
3029                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
3030                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3031                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3032                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
3033                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
3034                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
3035                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
3036                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
3037                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
3038                 </links>
3039         </class>
3040         <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">
3041                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
3042                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3043                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
3044                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3045                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
3046                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
3047                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
3048                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
3049                 </fields>
3050                 <links>
3051                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3052                 </links>
3053                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3054                         <actions>
3055                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
3056                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
3057                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
3058                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
3059                         </actions>
3060                 </permacrud>
3061         </class>
3062         <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">
3063                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
3064                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3065                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
3066                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
3067                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
3068                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
3069                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3070                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3071                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
3072                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
3073                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text"/>
3074                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
3075                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
3076                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3077                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
3078                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
3079                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3080                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3081                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3082                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3083                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
3084                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3085                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
3086                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
3087                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3088                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
3089                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3090                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3091                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3092                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
3093                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
3094                 </fields>
3095                 <links>
3096                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
3097                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
3098                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
3099                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
3100                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
3101                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
3102                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
3103                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
3104                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
3105                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
3106                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
3107                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
3108                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
3109                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
3110                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
3111                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
3112                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
3113                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
3114                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
3115                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
3116                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
3117                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
3118                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
3119                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
3120                 </links>
3121         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3122             <actions>
3123                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
3124                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
3125                     <context field="id"/>
3126                     <context field="parent_ou"/>
3127                                 </retrieve>
3128                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
3129                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
3130             </actions>
3131         </permacrud>
3132         </class>
3133         <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">
3134                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
3135                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3136                         <field name="btype" reporter:datatype="text"/>
3137                         <field name="id" reporter:datatype="id" />
3138                         <field name="name"  reporter:datatype="text"/>
3139                         <field name="owner" reporter:datatype="link"/>
3140                         <field name="pub" reporter:datatype="bool"/>
3141                         <field name="create_time" reporter:datatype="timestamp" />
3142                 </fields>
3143                 <links>
3144                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3145                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
3146                 </links>
3147         </class>
3148         <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">
3149                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
3150                         <field name="id" reporter:datatype="id" />
3151                         <field name="bucket" reporter:datatype="link"/>
3152                         <field name="note" reporter:datatype="text" />
3153                 </fields>
3154                 <links>
3155                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3156                 </links>
3157         </class>
3158         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
3159                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
3160                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
3161                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3162                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3163                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3164                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3165                 </fields>
3166                 <links>
3167                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3168                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
3169                 </links>
3170         </class>
3171         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
3172                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
3173                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
3174                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3175                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
3176                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3177                 </fields>
3178                 <links>
3179                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3180                 </links>
3181         </class>
3182         <class id="actsc" controller="open-ils.cstore" oils_obj:fieldmapper="actor::stat_cat" oils_persist:tablename="actor.stat_cat" reporter:label="User Statistical Category">
3183                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
3184                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
3185                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3186                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3187                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3188                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3189                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
3190                 </fields>
3191                 <links>
3192                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3193                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
3194                 </links>
3195         </class>
3196         <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">
3197                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
3198                         <field name="field" reporter:datatype="link"/>
3199                         <field name="id" reporter:datatype="id" />
3200                         <field name="source" reporter:datatype="link"/>
3201                         <field name="value"  reporter:datatype="text"/>
3202                 </fields>
3203                 <links>
3204                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3205                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3206                 </links>
3207         </class>
3208         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
3209                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
3210                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3211                         <field name="btype" reporter:datatype="text"/>
3212                         <field name="id" reporter:datatype="id" />
3213                         <field name="name"  reporter:datatype="text"/>
3214                         <field name="owner" reporter:datatype="link"/>
3215                         <field name="pub" reporter:datatype="bool"/>
3216                         <field name="create_time" reporter:datatype="timestamp" />
3217                 </fields>
3218                 <links>
3219                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3220                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
3221                 </links>
3222         </class>
3223         <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">
3224                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
3225                         <field name="id" reporter:datatype="id" />
3226                         <field name="bucket" reporter:datatype="link"/>
3227                         <field name="note" reporter:datatype="text" />
3228                 </fields>
3229                 <links>
3230                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
3231                 </links>
3232         </class>
3233         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
3234                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3235                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3236                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3237                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3238                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
3239                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
3240                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3241                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
3242                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3243                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3244                 </fields>
3245                 <links>
3246                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3247                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3248                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3249                 </links>
3250         </class>
3251         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
3252                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
3253                         <field name="id" reporter:datatype="id" />
3254                         <field name="ind1" />
3255                         <field name="ind2" />
3256                         <field name="record" />
3257                         <field name="subfield" />
3258                         <field name="tag" />
3259                         <field name="value" />
3260                 </fields>
3261                 <links>
3262                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3263                 </links>
3264         </class>
3265         <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">
3266                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
3267                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
3268                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3269                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
3270                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3271                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3272                 </fields>
3273                 <links>
3274                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3275                 </links>
3276         </class>
3277         <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">
3278                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
3279                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
3280                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
3281                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
3282                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
3283                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3284                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3285                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
3286                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
3287                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
3288                 </fields>
3289                 <links>
3290                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
3291                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
3292                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
3293                 </links>
3294         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3295             <actions>
3296                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
3297                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT" global_required="true"/>
3298                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
3299                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
3300             </actions>
3301         </permacrud>
3302         </class>
3303         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
3304                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
3305                         <field name="create_date" reporter:datatype="timestamp"/>
3306                         <field name="creator" reporter:datatype="link"/>
3307                         <field name="edit_date" reporter:datatype="timestamp"/>
3308                         <field name="editor" reporter:datatype="link"/>
3309                         <field name="id" reporter:datatype="id" />
3310                         <field name="pub" reporter:datatype="bool"/>
3311                         <field name="record" reporter:datatype="link"/>
3312                         <field name="value"  reporter:datatype="text"/>
3313                 </fields>
3314                 <links>
3315                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3316                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3317                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3318                 </links>
3319         </class>
3320         <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">
3321                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3322                         <field name="balance_owed" reporter:datatype="money" />
3323                         <field name="total_owed" reporter:datatype="money" />
3324                         <field name="total_paid" reporter:datatype="money" />
3325                         <field name="usr" reporter:datatype="link"/>
3326                 </fields>
3327                 <links>
3328                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3329                 </links>
3330         </class>
3331         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
3332                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3333                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
3334                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3335                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
3336                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3337                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
3338                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
3339                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3340                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3341                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3342                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3343                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3344                 </fields>
3345                 <links>
3346                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3347                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3348                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3349                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3350                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3351                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3352                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3353                 </links>
3354         </class>
3355         <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">
3356                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
3357                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
3358                         <field name="quality" reporter:datatype="int" />
3359                         <field name="source" reporter:datatype="text"/>
3360                         <field name="transcendant" reporter:datatype="bool"/>
3361                 </fields>
3362                 <links/>
3363         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3364             <actions>
3365                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
3366                 <retrieve/>
3367                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
3368                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
3369             </actions>
3370         </permacrud>
3371         </class>
3372         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
3373                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3374                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3375                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3376                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3377                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3378                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3379                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3380                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3381                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3382                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3383                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3384                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3385                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3386                 </fields>
3387                 <links>
3388                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3389                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3390                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3391                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3392                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3393                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3394                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3395                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3396                 </links>
3397         </class>
3398         <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">
3399                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
3400                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
3401                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
3402                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
3403                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
3404                 </fields>
3405                 <links>
3406                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
3407                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3408                 </links>
3409         </class>
3410         <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">
3411                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
3412                         <field name="bucket" reporter:datatype="link"/>
3413                         <field name="id" reporter:datatype="id" />
3414                         <field name="target_user" reporter:datatype="link"/>
3415                         <field name="create_time" reporter:datatype="timestamp" />
3416                         <field name="pos" reporter:datatype="int" />
3417                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3418                 </fields>
3419                 <links>
3420                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
3421                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
3422             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
3423                 </links>
3424         </class>
3425         <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">
3426                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
3427                         <field name="id" reporter:datatype="id" />
3428                         <field name="item" reporter:datatype="link"/>
3429                         <field name="note" reporter:datatype="text" />
3430                 </fields>
3431                 <links>
3432                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
3433                 </links>
3434         </class>
3435         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
3436                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3437                         <field name="balance_owed" reporter:datatype="money" />
3438                         <field name="total_owed" reporter:datatype="money" />
3439                         <field name="total_paid" reporter:datatype="money" />
3440                         <field name="usr" reporter:datatype="link"/>
3441                 </fields>
3442                 <links>
3443                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3444                 </links>
3445         </class>
3446         <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">
3447                 <fields oils_persist:primary="code" oils_persist:sequence="">
3448                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
3449                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3450                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
3451                 </fields>
3452                 <links/>
3453         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3454             <actions>
3455                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3456                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
3457                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3458                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3459             </actions>
3460         </permacrud>
3461         </class>
3462         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
3463                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3464                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3465                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3466                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3467                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3468                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3469                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3470                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
3471                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3472                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3473                 </fields>
3474                 <links>
3475                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3476                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3477                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3478                 </links>
3479         </class>
3480         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
3481                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3482                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3483                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3484                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3485                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3486                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3487                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3488                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
3489                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3490                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3491                 </fields>
3492                 <links>
3493                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3494                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3495                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3496                 </links>
3497         </class>
3498         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
3499                 <fields oils_persist:primary="id" oils_persist:sequence="">
3500                         <field name="checkin_lib" reporter:datatype="link"/>
3501                         <field name="checkin_staff" reporter:datatype="link"/>
3502                         <field name="checkin_time" reporter:datatype="timestamp"/>
3503                         <field name="circ_lib"  reporter:datatype="org_unit"/>
3504                         <field name="circ_staff" reporter:datatype="link"/>
3505                         <field name="desk_renewal" reporter:datatype="bool"/>
3506                         <field name="due_date" reporter:datatype="timestamp"/>
3507                         <field name="duration" reporter:datatype="interval"/>
3508                         <field name="duration_rule" reporter:datatype="link"/>
3509                         <field name="fine_interval" reporter:datatype="interval"/>
3510                         <field name="id" reporter:datatype="id" />
3511                         <field name="max_fine" reporter:datatype="money" />
3512                         <field name="max_fine_rule" reporter:datatype="link"/>
3513                         <field name="opac_renewal" reporter:datatype="bool"/>
3514                         <field name="phone_renewal" reporter:datatype="bool"/>
3515                         <field name="recurring_fine" reporter:datatype="money" />
3516                         <field name="recurring_fine_rule" reporter:datatype="link"/>
3517                         <field name="renewal_remaining" reporter:datatype="int" />
3518                         <field name="stop_fines" reporter:datatype="text"/>
3519                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
3520                         <field name="target_copy" reporter:datatype="link"/>
3521                         <field name="usr" reporter:datatype="link"/>
3522                         <field name="xact_finish" reporter:datatype="timestamp" />
3523                         <field name="xact_start" reporter:datatype="timestamp" />
3524                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3525                 </fields>
3526                 <links>
3527                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3528                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3529                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3530                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3531                 </links>
3532         </class>
3533         <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">
3534                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
3535                         <field name="field" reporter:datatype="link"/>
3536                         <field name="id" reporter:datatype="id" />
3537                         <field name="source" reporter:datatype="link"/>
3538                         <field name="value" reporter:datatype="text"/>
3539                 </fields>
3540                 <links>
3541                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3542                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3543                 </links>
3544         </class>
3545         <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">
3546                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
3547                         <field name="high" reporter:datatype="money" />
3548                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3549                         <field name="low" reporter:datatype="money" />
3550                         <field name="name" reporter:datatype="text"/>
3551                         <field name="normal" reporter:datatype="money" />
3552                         <field name="recurrence_interval" reporter:datatype="interval"/>
3553                 </fields>
3554                 <links/>
3555         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3556             <actions>
3557                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
3558                 <retrieve/>
3559                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
3560                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
3561             </actions>
3562         </permacrud>
3563         </class>
3564         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
3565                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3566                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3567                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3568                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3569                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
3570                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
3571                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3572                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3573                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3574                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
3575                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3576                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3577                 </fields>
3578                 <links>
3579                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3580                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3581                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3582                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3583                 </links>
3584         </class>
3585         <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">
3586                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
3587                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3588                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
3589                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
3590                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3591                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
3592                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
3593                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3594                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
3595                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
3596                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
3597                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3598                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3599                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3600                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
3601                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3602                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
3603                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
3604                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
3605                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3606                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3607                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
3608                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
3609                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
3610                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
3611                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
3612                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
3613                         <field reporter:label="Price" name="price" reporter:datatype="money" />
3614                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
3615                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
3616                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
3617                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
3618                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
3619                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3620                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3621                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3622                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
3623                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3624                 </fields>
3625                 <links>
3626                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
3627                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3628                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3629                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3630                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3631                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
3632                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3633                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
3634                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
3635                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
3636                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
3637                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
3638                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
3639                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
3640                 </links>
3641         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3642             <actions>
3643                 <create permission="CREATE_COPY">
3644                     <context link="call_number" field="owning_lib"/>
3645                 </create>
3646                 <retrieve/>
3647                 <update permission="UPDATE_COPY">
3648                     <context link="call_number" field="owning_lib"/>
3649                 </update>
3650                 <delete permission="DELETE_COPY">
3651                     <context link="call_number" field="owning_lib"/>
3652                 </delete>
3653             </actions>
3654         </permacrud>
3655         </class>
3656         <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">
3657                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
3658                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
3659                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3660                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
3661                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
3662                 </fields>
3663                 <links/>
3664         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3665             <actions>
3666                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
3667                 <retrieve/>
3668                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
3669                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
3670             </actions>
3671         </permacrud>
3672         </class>
3673         <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">
3674                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
3675                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
3676                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3677                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
3678                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
3679                 </fields>
3680                 <links/>
3681         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3682             <actions>
3683                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
3684                 <retrieve/>
3685                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
3686                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
3687             </actions>
3688         </permacrud>
3689         </class>
3690         <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">
3691                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
3692                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
3693                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3694                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3695                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3696                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
3697                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
3698                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
3699                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
3700                 </fields>
3701                 <links>
3702                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
3703                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
3704                 </links>
3705         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3706             <actions>
3707                 <create permission="CREATE_PERM" global_required="true"/>
3708                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
3709                 <update permission="UPDATE_PERM" global_required="true"/>
3710                 <delete permission="DELETE_PERM" global_required="true"/>
3711             </actions>
3712         </permacrud>
3713         </class>
3714         <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">
3715                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
3716                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
3717                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
3718                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
3719                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
3720                 </fields>
3721                 <links>
3722                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
3723                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
3724                 </links>
3725         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3726             <actions>
3727                 <create permission="ADMIN_SURVEY">
3728                     <context link="question" jump="survey" field="owner"/>
3729                 </create>
3730                 <retrieve/>
3731                 <update permission="ADMIN_SURVEY">
3732                     <context link="question" jump="survey" field="owner"/>
3733                 </update>
3734                 <delete permission="ADMIN_SURVEY">
3735                     <context link="question" jump="survey" field="owner"/>
3736                 </delete>
3737             </actions>
3738         </permacrud>
3739         </class>
3740         <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">
3741                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
3742                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3743                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
3744                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
3745                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
3746                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
3747                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
3748                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
3749                 </fields>
3750                 <links>
3751                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
3752                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3753                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
3754                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3755                 </links>
3756         </class>
3757         <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">
3758                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3759                         <field name="balance_owed" reporter:datatype="money" />
3760                         <field name="total_owed" reporter:datatype="money" />
3761                         <field name="total_paid" reporter:datatype="money" />
3762                         <field name="usr" reporter:datatype="link"/>
3763                 </fields>
3764                 <links>
3765                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3766                 </links>
3767         </class>
3768         <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">
3769                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
3770                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
3771                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
3772                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
3773                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
3774                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3775                 </fields>
3776                 <links>
3777                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3778                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
3779                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3780                 </links>
3781         </class>
3782         <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">
3783                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
3784                         <field name="field" reporter:datatype="link"/>
3785                         <field name="id" reporter:datatype="id" />
3786                         <field name="source" reporter:datatype="link"/>
3787                         <field name="value" reporter:datatype="text"/>
3788                 </fields>
3789                 <links>
3790                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3791                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3792                 </links>
3793         </class>
3794         <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">
3795                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
3796                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
3797                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
3798                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
3799                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
3800                 </fields>
3801                 <links>
3802                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
3803                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
3804                 </links>
3805         </class>
3806         <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">
3807                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
3808                         <field name="depth" reporter:datatype="int" />
3809                         <field name="grantable" reporter:datatype="bool"/>
3810                         <field name="grp" reporter:datatype="link"/>
3811                         <field name="id" reporter:datatype="id" />
3812                         <field name="perm" reporter:datatype="link"/>
3813                 </fields>
3814                 <links>
3815                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3816                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
3817                 </links>
3818         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3819             <actions>
3820                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
3821                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
3822                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
3823                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
3824             </actions>
3825         </permacrud>
3826         </class>
3827         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
3828                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
3829                         <field name="items" oils_persist:virtual="true" />
3830                         <field name="btype" reporter:datatype="text"/>
3831                         <field name="id" reporter:datatype="id" />
3832                         <field name="name" reporter:datatype="text"/>
3833                         <field name="owner" reporter:datatype="link"/>
3834                         <field name="pub" reporter:datatype="bool"/>
3835                         <field name="create_time" reporter:datatype="timestamp" />
3836                 </fields>
3837                 <links>
3838                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3839                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
3840                 </links>
3841         </class>
3842         <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">
3843                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
3844                         <field name="id" reporter:datatype="id" />
3845                         <field name="bucket" reporter:datatype="link"/>
3846                         <field name="note" reporter:datatype="text" />
3847                 </fields>
3848                 <links>
3849                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
3850                 </links>
3851         </class>
3852         <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">
3853                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
3854                         <field name="id" reporter:datatype="int" />
3855                         <field name="usr" reporter:datatype="link"/>
3856                         <field name="work_ou" reporter:datatype="link"/>
3857                 </fields>
3858                 <links>
3859                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3860                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
3861                 </links>
3862         </class>
3863         <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">
3864                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
3865                         <field name="depth" reporter:datatype="int"/>
3866                         <field name="grantable" reporter:datatype="bool"/>
3867                         <field name="id" reporter:datatype="id" />
3868                         <field name="perm" reporter:datatype="link"/>
3869                         <field name="usr" reporter:datatype="link"/>
3870                 </fields>
3871                 <links>
3872                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3873                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
3874                 </links>
3875         </class>
3876         <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">
3877                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
3878                         <field name="object_id" reporter:datatype="text"/>
3879                         <field name="grantable" reporter:datatype="bool"/>
3880                         <field name="id" reporter:datatype="id" />
3881                         <field name="perm" reporter:datatype="link"/>
3882                         <field name="usr" reporter:datatype="link"/>
3883                         <field name="object_type" reporter:datatype="text"/>
3884                 </fields>
3885                 <links>
3886                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3887                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
3888                 </links>
3889         </class>
3890         <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">
3891                 <fields oils_persist:primary="id" oils_persist:sequence="">
3892                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3893                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3894                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3895                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
3896                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
3897                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
3898                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
3899                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3900                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3901                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3902                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3903                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3904                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3905                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3906                 </fields>
3907                 <links>
3908                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
3909                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
3910                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
3911                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
3912                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
3913                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
3914                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
3915                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3916                 </links>
3917         </class>
3918         <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">
3919                 <fields oils_persist:primary="id" oils_persist:sequence="">
3920                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3921                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3922                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3923                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
3924                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
3925                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
3926                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
3927                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3928                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3929                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3930                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3931                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3932                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3933                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3934                 </fields>
3935                 <links>
3936                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
3937                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
3938                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
3939                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
3940                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
3941                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
3942                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
3943                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3944                 </links>
3945         </class>
3946         <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">
3947                 <fields oils_persist:primary="id" oils_persist:sequence="">
3948                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3949                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3950                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3951                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
3952                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
3953                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
3954                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
3955                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3956                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3957                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3958                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3959                 </fields>
3960                 <links>
3961                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
3962                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
3963                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
3964                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
3965                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3966                 </links>
3967         </class>
3968         <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">
3969                 <fields oils_persist:primary="id" oils_persist:sequence="">
3970                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3971                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3972                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3973                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
3974                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
3975                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
3976                         <field reporter:label="Accepting User" name="accepting_usr" />
3977                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
3978                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
3979                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3980                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3981                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3982                 </fields>
3983                 <links>
3984                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
3985                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
3986                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
3987                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3988                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3989                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3990                 </links>
3991         </class>
3992         <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">
3993                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
3994                         <field name="bucket" reporter:datatype="link"/>
3995                         <field name="id" reporter:datatype="id" />
3996                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
3997                         <field name="create_time" reporter:datatype="timestamp" />
3998                         <field name="pos" reporter:datatype="int" />
3999                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4000                 </fields>
4001                 <links>
4002                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
4003                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4004             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
4005                 </links>
4006         </class>
4007         <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">
4008                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
4009                         <field name="id" reporter:datatype="id" />
4010                         <field name="item" reporter:datatype="link"/>
4011                         <field name="note" reporter:datatype="text" />
4012                 </fields>
4013                 <links>
4014                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
4015                 </links>
4016         </class>
4017         <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">
4018                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
4019                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
4020                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
4021                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
4022                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
4023                 </fields>
4024                 <links>
4025                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4026                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4027                 </links>
4028         </class>
4029
4030         <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">
4031                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
4032                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
4033                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
4034                 </fields>
4035                 <links/>
4036         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4037             <actions>
4038                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4039                 <retrieve/>
4040                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4041                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4042             </actions>
4043         </permacrud>
4044         </class>
4045
4046
4047         <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">
4048                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
4049                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
4050                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
4051                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
4052                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
4053                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
4054                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
4055                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
4056                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
4057                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
4058                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
4059                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
4060                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
4061                 </fields>
4062                 <links>
4063                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
4064                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4065                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
4066                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
4067                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
4068                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
4069                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4070                 </links>
4071         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4072             <actions>
4073                 <create permission="TRANSIT_COPY" context_field="owner">
4074                     <context link="target_copy" field="circ_lib"/>
4075                 </create>
4076                 <retrieve/>
4077                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
4078                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
4079             </actions>
4080         </permacrud>
4081         </class>
4082         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
4083                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
4084                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4085                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
4086                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
4087                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
4088                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4089                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
4090                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4091                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
4092                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
4093                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
4094                 </fields>
4095                 <links>
4096                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4097                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
4098                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
4099                 </links>
4100         </class>
4101         <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">
4102                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
4103                         <field name="grp" />
4104                         <field name="id" reporter:datatype="id" />
4105                         <field name="usr" />
4106                 </fields>
4107                 <links>
4108                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4109                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4110                 </links>
4111         </class>
4112         <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">
4113                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
4114                         <field name="id" reporter:datatype="id" />
4115                         <field name="fq_field" reporter:datatype="text"/>
4116                         <field name="identity_value" reporter:datatype="text"/>
4117                         <field name="translation" reporter:datatype="text"/>
4118                         <field name="string" reporter:datatype="text"/>
4119                 </fields>
4120                 <links>
4121                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
4122                 </links>
4123         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4124             <actions>
4125                 <create permission="CREATE_TRANSLATION" global_required="true"/>
4126                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
4127                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
4128                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
4129             </actions>
4130         </permacrud>
4131         </class>
4132         <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">
4133                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
4134                         <field name="id" reporter:datatype="id" />
4135                         <field name="fm_class" reporter:datatype="text"/>
4136                         <field name="field" reporter:datatype="text"/>
4137                         <field name="owner" reporter:datatype="org_unit"/>
4138                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
4139                 </fields>
4140                 <links>
4141                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4142                 </links>
4143         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4144             <actions>
4145                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
4146                 <retrieve/>
4147                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
4148                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
4149             </actions>
4150         </permacrud>
4151         </class>
4152         <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">
4153                 <fields oils_persist:primary="code">
4154                         <field name="code" reporter:datatype="id" />
4155                         <field name="marc_code" reporter:datatype="text"/>
4156                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4157                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4158                 </fields>
4159                 <links/>
4160         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4161             <actions>
4162                 <create permission="CREATE_LOCALE" global_required="true"/>
4163                 <retrieve permission="CREATE_LOCALE UPDATE_LOCALE DELETE_LOCALE" global_required="true"/>
4164                 <update permission="UPDATE_LOCALE" global_required="true"/>
4165                 <delete permission="DELETE_LOCALE" global_required="true"/>
4166             </actions>
4167         </permacrud>
4168         </class>
4169         <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">
4170                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
4171                         <field name="id" reporter:datatype="id" reporter:label="ID" />
4172                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
4173                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
4174             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
4175                 </fields>
4176                 <links>
4177                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4178                 </links>
4179         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4180             <actions>
4181                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
4182                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
4183                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
4184                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
4185             </actions>
4186         </permacrud>
4187         </class>
4188         <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">
4189                 <fields oils_persist:primary="code">
4190                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
4191                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
4192                 </fields>
4193                 <links/>
4194         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4195             <actions>
4196                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4197                 <retrieve/>
4198                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4199                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4200             </actions>
4201         </permacrud>
4202         </class>
4203
4204         <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">
4205                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
4206                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
4207                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
4208                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
4209                         <field reporter:label="Ratio" name="ratio" />
4210                 </fields>
4211                 <links>
4212                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
4213                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
4214                 </links>
4215                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4216                         <actions>
4217                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4218                                 <retrieve/>
4219                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4220                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4221                         </actions>
4222                 </permacrud>
4223         </class>
4224
4225         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
4226                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
4227                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
4228                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
4229                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
4230                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
4231                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4232                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
4233                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
4234                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
4235                 </fields>
4236                 <links>
4237                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4238                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4239             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
4240                 </links>
4241         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4242             <actions>
4243                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
4244                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
4245                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
4246                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
4247             </actions>
4248         </permacrud>
4249         </class>
4250
4251         <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">
4252                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
4253                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
4254                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4255                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4256                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4257                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4258                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
4259                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
4260                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4261                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
4262                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
4263                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
4264                 </fields>
4265                 <links>
4266                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4267                 </links>
4268         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4269             <actions>
4270                 <create permission="ADMIN_PROVIDER">
4271                     <context link="provider" field="owner"/>
4272                 </create>
4273                 <retrieve permission="ADMIN_PROVIDER">
4274                     <context link="provider" field="owner"/>
4275                 </retrieve>
4276                 <update permission="ADMIN_PROVIDER">
4277                     <context link="provider" field="owner"/>
4278                 </update>
4279                 <delete permission="ADMIN_PROVIDER">
4280                     <context link="provider" field="owner"/>
4281                 </delete>
4282             </actions>
4283         </permacrud>
4284         </class>
4285
4286         <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">
4287                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
4288                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4289                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
4290                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4291                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
4292                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
4293                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
4294         </fields>
4295                 <links>
4296                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4297                 </links>
4298         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4299             <actions>
4300                 <create permission="ADMIN_PROVIDER">
4301                     <context link="provider" field="owner"/>
4302                 </create>
4303                 <retrieve permission="ADMIN_PROVIDER">
4304                     <context link="provider" field="owner"/>
4305                 </retrieve>
4306                 <update permission="ADMIN_PROVIDER">
4307                     <context link="provider" field="owner"/>
4308                 </update>
4309                 <delete permission="ADMIN_PROVIDER">
4310                     <context link="provider" field="owner"/>
4311                 </delete>
4312             </actions>
4313         </permacrud>
4314     </class>
4315         <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">
4316                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
4317                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
4318                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4319                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4320                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4321                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
4322                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4323                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4324                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4325                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4326                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
4327                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
4328                 </fields>
4329                 <links>
4330                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
4331                 </links>
4332         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4333             <actions>
4334                 <create permission="ADMIN_PROVIDER">
4335                     <context link="contact" jump='provider' field="owner"/>
4336                 </create>
4337                 <retrieve permission="ADMIN_PROVIDER">
4338                     <context link="contact" jump='provider' field="owner"/>
4339                 </retrieve>
4340                 <update permission="ADMIN_PROVIDER">
4341                     <context link="contact" jump='provider' field="owner"/>
4342                 </update>
4343                 <delete permission="ADMIN_PROVIDER">
4344                     <context link="contact" jump='provider' field="owner"/>
4345                 </delete>
4346             </actions>
4347         </permacrud>
4348         </class>
4349
4350         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
4351                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
4352                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='id'/>
4353                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
4354                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
4355                 </fields>
4356                 <links>
4357             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
4358                 </links>
4359                 <!--
4360                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
4361                         But here's what it should look like if we ever do use pcrud.
4362                 -->
4363                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4364                         <actions>
4365                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4366                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4367                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4368                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4369                         </actions>
4370                 </permacrud>
4371         </class>
4372
4373         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
4374                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
4375                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='id'/>
4376                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
4377                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
4378                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
4379                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
4380                 </fields>
4381                 <links>
4382                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
4383                 </links>
4384                 <!--
4385                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
4386                         But here's what it should look like if we ever do use pcrud.
4387                 -->
4388                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4389                         <actions>
4390                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4391                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4392                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4393                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4394                         </actions>
4395                 </permacrud>
4396         </class>
4397
4398         <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">
4399                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
4400                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
4401                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
4402                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
4403                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
4404                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4405                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
4406                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
4407                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
4408                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
4409                 </fields>
4410                 <links>
4411                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4412                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4413             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
4414             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
4415                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
4416                 </links>
4417         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4418             <actions>
4419                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
4420                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
4421                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
4422                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
4423             </actions>
4424         </permacrud>
4425         </class>
4426
4427         <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">
4428                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
4429                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
4430                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
4431                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4432                         <field reporter:label="Note" name="note" reporter:datatype="text" />
4433                 </fields>
4434                 <links>
4435                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4436                 </links>
4437         </class>
4438
4439         <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">
4440                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
4441                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
4442                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4443                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
4444                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
4445                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4446                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="text" />
4447                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
4448                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
4449                 </fields>
4450                 <links>
4451                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4452                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4453                 </links>
4454         </class>
4455
4456         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
4457                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
4458                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
4459                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
4460                         <field reporter:label="Name" name="name" reporter:datatype="text" />
4461                         <field reporter:label="Year" name="year" reporter:datatype="int" />
4462                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
4463                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4464                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
4465                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
4466                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
4467                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
4468                 </fields>
4469                 <links>
4470                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4471                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4472             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
4473             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
4474             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
4475                 </links>
4476         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4477             <actions>
4478                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
4479                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
4480                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
4481                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
4482             </actions>
4483         </permacrud>
4484         </class>
4485
4486         <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">
4487                 <fields oils_persist:primary="fund">
4488                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4489                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
4490                 </fields>
4491                 <links>
4492                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4493                 </links>
4494         </class>
4495
4496         <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">
4497                 <fields oils_persist:primary="fund">
4498                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4499                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
4500                 </fields>
4501                 <links>
4502                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4503                 </links>
4504         </class>
4505
4506         <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">
4507                 <fields oils_persist:primary="fund">
4508                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4509                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
4510                 </fields>
4511                 <links>
4512                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4513                 </links>
4514         </class>
4515
4516         <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">
4517                 <fields oils_persist:primary="fund">
4518                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4519                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
4520                 </fields>
4521                 <links>
4522                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4523                 </links>
4524         </class>
4525
4526         <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">
4527                 <fields oils_persist:primary="fund">
4528                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4529                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
4530                 </fields>
4531                 <links>
4532                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4533                 </links>
4534         </class>
4535
4536         <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">
4537                 <fields oils_persist:primary="funding_source">
4538                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
4539                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
4540                 </fields>
4541                 <links>
4542                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4543                 </links>
4544         </class>
4545
4546         <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">
4547                 <fields oils_persist:primary="funding_source">
4548                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
4549                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
4550                 </fields>
4551                 <links>
4552                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4553                 </links>
4554         </class>
4555
4556         <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">
4557                 <fields oils_persist:primary="funding_source">
4558                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
4559                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
4560                 </fields>
4561                 <links>
4562                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4563                 </links>
4564         </class>
4565
4566         <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">
4567                 <fields oils_persist:primary="fund">
4568                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4569                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
4570                 </fields>
4571                 <links>
4572                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4573                 </links>
4574         </class>
4575
4576         <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">
4577                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
4578                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
4579                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
4580                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
4581                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4582                         <field reporter:label="Percent" name="percent" reporter:datatype="float" />
4583                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
4584                         <field reporter:label="Note" name="note" reporter:datatype="text" />
4585                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
4586                 </fields>
4587                 <links>
4588                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
4589                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4590                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4591                 </links>
4592         </class>
4593
4594     <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">
4595         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
4596             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
4597             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
4598             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
4599             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
4600             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
4601             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
4602             <field reporter:label="Note" name="note" reporter:datatype="text" />
4603             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
4604         </fields>
4605         <links>
4606             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
4607             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4608             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4609         </links>
4610                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4611                         <actions>
4612                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
4613                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
4614                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
4615                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
4616                         </actions>
4617                 </permacrud>
4618     </class>
4619
4620         <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">
4621                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
4622                         <field reporter:label="Picklist ID" name="id" reporter:datatype="id" />
4623                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
4624                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link" />
4625                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
4626                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
4627                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
4628                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
4629                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
4630                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
4631                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
4632                 </fields>
4633                 <links>
4634                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4635                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4636                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4637                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4638                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
4639                 </links>
4640         </class>
4641
4642         <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">
4643                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
4644                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" />
4645                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
4646                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
4647                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
4648                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
4649                         <field reporter:label="State" name="state" reporter:datatype="text" />
4650                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
4651                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
4652                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
4653                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
4654                         <field reporter:label="Name" name="name" reporter:datatype="text" />
4655                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
4656                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="link" />
4657                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
4658                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
4659                 </fields>
4660                 <links>
4661                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4662                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4663                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4664                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
4665                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4666                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
4667                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
4668                 </links>
4669                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4670                         <actions>
4671                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
4672                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
4673                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
4674                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
4675                         </actions>
4676                 </permacrud>
4677         </class>
4678
4679         <class id="acqpon" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::po_note" oils_persist:tablename="acq.po_note" reporter:label="PO Note">
4680                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
4681                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
4682                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
4683                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
4684                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
4685                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
4686                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
4687                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
4688                 </fields>
4689                 <links>
4690                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4691                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4692                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
4693                 </links>
4694         </class>
4695
4696         <class id="jub" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
4697                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
4698                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
4699                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
4700                         <field reporter:label="Picklist" name="picklist" reporter:datatype="link" />
4701                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
4702                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
4703                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
4704                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
4705                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
4706                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
4707                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
4708                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
4709                         <field reporter:label="State" name="state" reporter:datatype="text" />
4710                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
4711                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
4712                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
4713                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
4714                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
4715                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
4716                 </fields>
4717                 <links>
4718                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
4719                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4720                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4721                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4722                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
4723                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
4724                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
4725                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
4726                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
4727                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
4728                 </links>
4729         </class>
4730
4731         <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">
4732                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
4733                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
4734                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
4735                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
4736                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
4737                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
4738                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
4739                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
4740                 </fields>
4741                 <links>
4742                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4743                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4744                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
4745                 </links>
4746         </class>
4747
4748         <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">
4749                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
4750                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
4751                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
4752                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
4753                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
4754                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
4755                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
4756                 </fields>
4757                 <links>
4758                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
4759                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
4760                 </links>
4761         </class>
4762
4763         <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">
4764                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
4765                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
4766                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
4767                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
4768                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
4769                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
4770                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
4771                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
4772                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
4773                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
4774                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
4775                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
4776                         <field reporter:label="Note" name="note" reporter:datatype="text" />
4777                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
4778                 </fields>
4779                 <links>
4780                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
4781                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
4782                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4783                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
4784                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4785                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4786                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4787                 </links>
4788         </class>
4789
4790         <class id="acqliad" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_attr_definition" oils_persist:tablename="acq.lineitem_attr_definition" reporter:label="Line Item Attribute Definition">
4791                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
4792                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
4793                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4794                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
4795                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
4796                 </fields>
4797                 <links/>
4798         </class>
4799
4800         <class id="acqlimad" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_marc_attr_definition" oils_persist:tablename="acq.lineitem_marc_attr_definition" reporter:label="Line Item MARC Attribute Definition">
4801                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
4802                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
4803                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4804                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
4805                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
4806                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
4807                 </fields>
4808                 <links/>
4809         </class>
4810
4811         <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">
4812                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
4813                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
4814                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4815                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
4816                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
4817                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
4818                 </fields>
4819                 <links/>
4820         </class>
4821         <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">
4822                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
4823                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
4824                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4825                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
4826                         <field reporter:label="User" name="usr" reporter:datatype="link" />
4827                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
4828                 </fields>
4829                 <links>
4830                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4831                 </links>
4832         </class>
4833
4834         <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">
4835             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
4836                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
4837                 <field reporter:label="Code" name="code" reporter:datatype="text" />
4838                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
4839                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
4840                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
4841                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
4842         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
4843
4844             </fields>
4845             <links>
4846                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4847             </links>
4848             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4849                 <actions>
4850                     <create permission="ADMIN_PROVIDER">
4851                         <context link="provider" field="owner"/>
4852                     </create>
4853                     <retrieve permission="ADMIN_PROVIDER">
4854                         <context link="provider" field="owner"/>
4855                     </retrieve>
4856                     <update permission="ADMIN_PROVIDER">
4857                         <context link="provider" field="owner"/>
4858                     </update>
4859                     <delete permission="ADMIN_PROVIDER">
4860                         <context link="provider" field="owner"/>
4861                     </delete>
4862                 </actions>
4863             </permacrud>
4864         </class>
4865         
4866         <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">
4867             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
4868                 <field reporter:label="ID" name="id" reporter:datatype="id" />
4869                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
4870                 <field reporter:label="Name" name="name" reporter:datatype="text" />
4871                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
4872             </fields>
4873             <links>
4874                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4875             </links>
4876             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4877                 <actions>
4878                     <create permission="ADMIN_PROVIDER">
4879                         <context link="provider" field="owner"/>
4880                     </create>
4881                     <retrieve permission="ADMIN_PROVIDER">
4882                         <context link="provider" field="owner"/>
4883                     </retrieve>
4884                     <update permission="ADMIN_PROVIDER">
4885                         <context link="provider" field="owner"/>
4886                     </update>
4887                     <delete permission="ADMIN_PROVIDER">
4888                         <context link="provider" field="owner"/>
4889                     </delete>
4890                 </actions>
4891             </permacrud>
4892         </class>
4893         
4894         <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">
4895             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
4896                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
4897                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4898                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
4899                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
4900                 </fields>
4901                 <links/>
4902         </class>
4903
4904         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
4905                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
4906                         <field name="id" reporter:datatype="id" />
4907                         <field name="parent" reporter:datatype="link"/>
4908                         <field name="owner" reporter:datatype="link"/>
4909                         <field name="create_time" reporter:datatype="timestamp"/>
4910                         <field name="name" reporter:datatype="text"/>
4911                         <field name="shared" reporter:datatype="bool"/>
4912                         <field name="share_with" reporter:datatype="link"/>
4913                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4914                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
4915                 </fields>
4916                 <links>
4917                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4918                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
4919                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
4920                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
4921                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
4922                 </links>
4923         </class>
4924         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
4925                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
4926                         <field name="id" reporter:datatype="id" />
4927                         <field name="parent" reporter:datatype="link"/>
4928                         <field name="owner" reporter:datatype="link"/>
4929                         <field name="create_time" reporter:datatype="timestamp"/>
4930                         <field name="name" reporter:datatype="text"/>
4931                         <field name="shared" reporter:datatype="bool"/>
4932                         <field name="share_with" reporter:datatype="link"/>
4933                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4934                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
4935                 </fields>
4936                 <links>
4937                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4938                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
4939                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
4940                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
4941                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
4942                 </links>
4943         </class>
4944         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
4945                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
4946                         <field name="id" reporter:datatype="id" />
4947                         <field name="parent" reporter:datatype="link"/>
4948                         <field name="owner" reporter:datatype="link"/>
4949                         <field name="create_time" reporter:datatype="timestamp"/>
4950                         <field name="name" reporter:datatype="text"/>
4951                         <field name="shared" reporter:datatype="bool"/>
4952                         <field name="share_with" reporter:datatype="link"/>
4953                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4954                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
4955                 </fields>
4956                 <links>
4957                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4958                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
4959                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
4960                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
4961                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
4962                 </links>
4963         </class>
4964         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
4965                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
4966                         <field name="id" reporter:datatype="id" />
4967                         <field name="owner" reporter:datatype="link"/>
4968                         <field name="create_time" reporter:datatype="timestamp"/>
4969                         <field name="name" reporter:datatype="text"/>
4970                         <field name="data" reporter:datatype="text"/>
4971                         <field name="folder" reporter:datatype="link"/>
4972                         <field name="description" reporter:datatype="text"/>
4973                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
4974                 </fields>
4975                 <links>
4976                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4977                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
4978                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
4979                 </links>
4980         </class>
4981         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
4982                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
4983                         <field name="id" reporter:datatype="id" />
4984                         <field name="owner" reporter:datatype="link"/>
4985                         <field name="create_time" reporter:datatype="timestamp"/>
4986                         <field name="template" reporter:datatype="link"/>
4987                         <field name="data" reporter:datatype="link"/>
4988                         <field name="folder" reporter:datatype="link"/>
4989                         <field name="recur" reporter:datatype="bool"/>
4990                         <field name="recurrence" reporter:datatype="interval"/>
4991                         <field name="name" reporter:datatype="text"/>
4992                         <field name="description" reporter:datatype="text"/>
4993                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
4994                 </fields>
4995                 <links>
4996                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4997                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
4998                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
4999                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
5000                 </links>
5001         </class>
5002         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
5003                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
5004                         <field name="id" reporter:datatype="id" />
5005                         <field name="runner" reporter:datatype="link"/>
5006                         <field name="start_time" reporter:datatype="timestamp"/>
5007                         <field name="complete_time" reporter:datatype="timestamp"/>
5008                         <field name="run_time" reporter:datatype="timestamp"/>
5009                         <field name="email" reporter:datatype="text"/>
5010                         <field name="excel_format" reporter:datatype="bool"/>
5011                         <field name="csv_format" reporter:datatype="bool"/>
5012                         <field name="html_format" reporter:datatype="bool"/>
5013                         <field name="error_code" reporter:datatype="int"/>
5014                         <field name="error_text" reporter:datatype="text"/>
5015                         <field name="report" reporter:datatype="link"/>
5016                         <field name="folder" reporter:datatype="link"/>
5017                         <field name="chart_pie" reporter:datatype="bool"/>
5018                         <field name="chart_bar" reporter:datatype="bool"/>
5019                         <field name="chart_line" reporter:datatype="bool"/>
5020                 </fields>
5021                 <links>
5022                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
5023                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
5024                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
5025                 </links>
5026         </class>
5027         <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">
5028                 <fields oils_persist:primary="id">
5029                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5030                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
5031                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
5032                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
5033                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
5034                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
5035                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
5036                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
5037                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
5038                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
5039                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
5040                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
5041                 </fields>
5042                 <links>
5043                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
5044                 </links>
5045         </class>
5046         <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">
5047                 <fields oils_persist:primary="id">
5048                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5049                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
5050                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
5051                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
5052                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
5053                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
5054                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
5055                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
5056                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
5057                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
5058                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
5059                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
5060                 </fields>
5061                 <links>
5062                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
5063                 </links>
5064         </class>
5065         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
5066                 <fields oils_persist:primary="id">
5067                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5068                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
5069                         <field reporter:label="Fingerprint" name="fingerprint" />
5070                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
5071                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
5072                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
5073                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
5074                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
5075                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
5076                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
5077                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
5078                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
5079                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
5080                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
5081                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
5082                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
5083                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
5084                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
5085                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
5086                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
5087                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
5088                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
5089                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
5090                 </fields>
5091                 <links>
5092                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
5093                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
5094                 </links>
5095         </class>
5096         <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">
5097                 <fields oils_persist:primary="id">
5098                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
5099                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
5100                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
5101                 </fields>
5102                 <links>
5103                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
5104                 </links>
5105         </class>
5106         <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">
5107                 <fields oils_persist:primary="id">
5108                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
5109                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
5110                 </fields>
5111                 <links>
5112                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
5113                 </links>
5114         </class>
5115         <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">
5116                 <fields oils_persist:primary="id">
5117                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5118                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
5119                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
5120                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
5121                 </fields>
5122                 <links>
5123                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
5124                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
5125                 </links>
5126         </class>
5127         <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">
5128                 <fields oils_persist:primary="xact">
5129                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
5130                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
5131                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
5132                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
5133                 </fields>
5134                 <links>
5135                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
5136                 </links>
5137         </class>
5138         <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">
5139                 <fields oils_persist:primary="xact">
5140                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
5141                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
5142                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
5143                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
5144                 </fields>
5145                 <links>
5146                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
5147                 </links>
5148         </class>
5149         <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)">
5150                 <fields oils_persist:primary="id">
5151                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
5152                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
5153                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
5154                 </fields>
5155                 <links>
5156                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
5157                 </links>
5158         </class>
5159         <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">
5160                 <fields oils_persist:primary="id">
5161                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
5162                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
5163                 </fields>
5164                 <links>
5165                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
5166                 </links>
5167         </class>
5168         <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">
5169                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
5170                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
5171                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
5172                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
5173                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
5174                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5175                 </fields>
5176                 <links>
5177                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5178                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
5179                 </links>
5180                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5181                         <actions>
5182                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
5183                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
5184                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
5185                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
5186                         </actions>
5187                 </permacrud>
5188         </class>
5189         <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">
5190                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
5191                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
5192                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
5193                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
5194                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
5195                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5196                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
5197                 </fields>
5198                 <links>
5199                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
5200                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5201                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5202                 </links>
5203                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5204                         <actions>
5205                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
5206                                         <context link="formula" field="owner"/>
5207                                 </create>
5208                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
5209                                         <context link="formula" field="owner"/>
5210                                 </retrieve>
5211                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
5212                                         <context link="formula" field="owner"/>
5213                                 </update>
5214                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
5215                                         <context link="formula" field="owner"/>
5216                                 </delete>
5217                         </actions>
5218                 </permacrud>
5219         </class>
5220
5221     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
5222         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
5223             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
5224             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
5225             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
5226             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
5227             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5228             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
5229             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
5230             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
5231             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
5232             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
5233             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
5234             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
5235             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
5236             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
5237             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
5238         </fields>
5239     </class>
5240
5241     <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">
5242         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
5243             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
5244             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
5245             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
5246             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5247             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
5248         </fields>
5249     </class>
5250
5251     <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">
5252         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
5253             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
5254             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
5255             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
5256             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
5257             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
5258             <field reporter:label="City" name="city" reporter:datatype="text"/>
5259             <field reporter:label="State" name="state" reporter:datatype="text"/>
5260             <field reporter:label="Country" name="country" reporter:datatype="text"/>
5261             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
5262             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
5263         </fields>
5264     </class>
5265
5266     <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">
5267         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
5268             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
5269             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
5270             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
5271             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
5272             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
5273             <field reporter:label="City" name="city" reporter:datatype="text"/>
5274             <field reporter:label="State" name="state" reporter:datatype="text"/>
5275             <field reporter:label="Country" name="country" reporter:datatype="text"/>
5276             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
5277             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
5278         </fields>
5279     </class>
5280
5281     <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">
5282         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
5283             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
5284             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
5285             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
5286             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
5287             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
5288             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
5289         </fields>
5290     </class>
5291
5292     <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">
5293                 <oils_persist:source_definition>
5294
5295             SELECT  u.hold,
5296                     c.circ_lib,
5297                     count(*)
5298               FROM  action.unfulfilled_hold_list u
5299                     JOIN asset.copy c ON (c.id = u.current_copy)
5300               GROUP BY 1,2
5301
5302                 </oils_persist:source_definition>
5303         <fields>
5304             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5305             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
5306             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
5307         </fields>
5308                 <links>
5309                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5310                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5311                 </links>
5312     </class>
5313
5314     <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">
5315                 <oils_persist:source_definition>
5316
5317             SELECT  hold,
5318                     min(count)
5319               FROM  action.unfulfilled_hold_loops
5320               GROUP BY 1
5321
5322                 </oils_persist:source_definition>
5323         <fields>
5324             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5325             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
5326         </fields>
5327                 <links>
5328                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5329                 </links>
5330     </class>
5331
5332     <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">
5333                 <oils_persist:source_definition>
5334
5335             SELECT  DISTINCT l.*
5336               FROM  action.unfulfilled_hold_loops l
5337                     JOIN action.unfulfilled_hold_min_loop m USING (hold)
5338               WHERE l.count = m.min
5339
5340                 </oils_persist:source_definition>
5341         <fields>
5342             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5343             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
5344             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
5345         </fields>
5346                 <links>
5347                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5348                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5349                 </links>
5350     </class>
5351
5352     <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">
5353                 <oils_persist:source_definition>
5354
5355             SELECT  hold,
5356                     max(count)
5357               FROM  action.unfulfilled_hold_loops
5358               GROUP BY 1
5359
5360                 </oils_persist:source_definition>
5361         <fields>
5362             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5363             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
5364         </fields>
5365                 <links>
5366                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5367                 </links>
5368     </class>
5369
5370     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:tablename="action.unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
5371                 <oils_persist:source_definition>
5372
5373             SELECT  DISTINCT l.*
5374               FROM  action.unfulfilled_hold_loops l
5375                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
5376               WHERE l.count = m.max
5377
5378                 </oils_persist:source_definition>
5379         <fields>
5380             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5381             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
5382             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
5383         </fields>
5384                 <links>
5385                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5386                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5387                 </links>
5388     </class>
5389
5390         <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">
5391                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
5392                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
5393                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
5394                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
5395                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
5396                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="int"/>
5397                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="int"/>
5398                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="int"/>
5399                 </fields>
5400                 <links>
5401                 </links>
5402                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5403                 </permacrud>
5404         </class>
5405
5406         <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">
5407                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
5408                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
5409                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
5410                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5411                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
5412                 </fields>
5413                 <links>
5414                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
5415                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
5416                 </links>
5417                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5418                 </permacrud>
5419         </class>
5420
5421         <class id="qdt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
5422                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
5423                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
5424                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
5425                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
5426                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
5427                 </fields>
5428                 <links>
5429                 </links>
5430                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5431                 </permacrud>
5432         </class>
5433
5434         <class id="qsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
5435                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
5436                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
5437                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
5438                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5439                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
5440                 </fields>
5441                 <links>
5442                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
5443                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
5444                 </links>
5445                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5446                 </permacrud>
5447         </class>
5448         
5449         <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">
5450                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
5451                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
5452                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
5453                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
5454                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
5455                 </fields>
5456                 <links>
5457                         <link field="return_type" reltype="might_have" key="id" map="" class="qdt"/>
5458                 </links>
5459                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5460                 </permacrud>
5461         </class>
5462         
5463         <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">
5464                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
5465                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
5466                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
5467                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5468                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
5469                 </fields>
5470                 <links>
5471                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
5472                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
5473                 </links>
5474                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5475                 </permacrud>
5476         </class>
5477
5478         <class id="qxp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
5479                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5480                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5481                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
5482                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5483                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5484                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5485                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
5486                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
5487                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
5488                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
5489                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
5490                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
5491                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
5492                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
5493                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
5494                 </fields>
5495                 <links>
5496                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5497                         <link field="left_operand" reltype="might_have" key="id" map="" class="qxp"/>
5498                         <link field="right_operand" reltype="might_have" key="id" map="" class="qxp"/>
5499                         <link field="function_id" reltype="might_have" key="id" map="" class="qfs"/>
5500                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
5501                         <link field="cast_type" reltype="might_have" key="id" map="" class="qdt"/>
5502                 </links>
5503                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5504                 </permacrud>
5505         </class>
5506
5507         <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">
5508                 <fields oils_persist:primary="id" oils_persist:sequence="case_branch_id_seq">
5509                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
5510                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5511                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5512                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
5513                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
5514                 </fields>
5515                 <links>
5516                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
5517                         <link field="condition" reltype="might_have" key="id" map="" class="qxp"/>
5518                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
5519                 </links>
5520                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5521                 </permacrud>
5522         </class>
5523
5524         <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">
5525                 <fields oils_persist:primary="id" oils_persist:sequence="from_relation_id_seq">
5526                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
5527                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
5528                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
5529                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
5530                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
5531                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
5532                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
5533                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
5534                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5535                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
5536                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
5537                 </fields>
5538                 <links>
5539                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
5540                         <link field="function_call" reltype="might_have" key="id" map="" class="qxp"/>
5541                         <link field="parent_relation" reltype="might_have" key="id" map="" class="qfr"/>
5542                         <link field="on_clause" reltype="might_have" key="id" map="" class="qxp"/>
5543                 </links>
5544                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5545                 </permacrud>
5546         </class>
5547
5548         <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">
5549                 <fields oils_persist:primary="id" oils_persist:sequence="record_column_id_seq">
5550                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
5551                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
5552                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5553                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
5554                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
5555                 </fields>
5556                 <links>
5557                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
5558                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
5559                 </links>
5560                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5561                 </permacrud>
5562         </class>
5563
5564         <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">
5565                 <fields oils_persist:primary="id" oils_persist:sequence="select_item_id_seq">
5566                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
5567                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
5568                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5569                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
5570                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
5571                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
5572                 </fields>
5573                 <links>
5574                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
5575                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
5576                 </links>
5577                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5578                 </permacrud>
5579         </class>
5580
5581         <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">
5582                 <fields oils_persist:primary="id" oils_persist:sequence="order_by_item_id_seq">
5583                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
5584                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
5585                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5586                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
5587                 </fields>
5588                 <links>
5589                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
5590                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
5591                 </links>
5592                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5593                 </permacrud>
5594         </class>
5595
5596         <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">
5597                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5598                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5599                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5600                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5601                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5602                 </fields>
5603                 <links>
5604                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5605                 </links>
5606                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5607                 </permacrud>
5608         </class>
5609
5610         <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">
5611                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5612                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5613                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5614                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5615                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5616                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
5617                 </fields>
5618                 <links>
5619                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5620                 </links>
5621                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5622                 </permacrud>
5623         </class>
5624
5625         <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">
5626                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5627                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5628                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5629                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5630                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5631                 </fields>
5632                 <links>
5633                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5634                 </links>
5635                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5636                 </permacrud>
5637         </class>
5638
5639         <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">
5640                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5641                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5642                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5643                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5644                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5645                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
5646                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
5647                 </fields>
5648                 <links>
5649                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5650                         <link field="left_operand" reltype="might_have" key="id" map="" class="qxp"/>
5651                         <link field="cast_type" reltype="might_have" key="id" map="" class="qdt"/>
5652                 </links>
5653                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5654                 </permacrud>
5655         </class>
5656
5657         <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">
5658                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5659                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5660                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5661                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5662                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5663                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
5664                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
5665                 </fields>
5666                 <links>
5667                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5668                 </links>
5669                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5670                 </permacrud>
5671         </class>
5672
5673         <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">
5674                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5675                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5676                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5677                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5678                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5679                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
5680                 </fields>
5681                 <links>
5682                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5683                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
5684                 </links>
5685                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5686                 </permacrud>
5687         </class>
5688
5689         <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">
5690                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5691                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5692                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5693                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5694                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5695                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
5696                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
5697                 </fields>
5698                 <links>
5699                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5700                         <link field="left_operand" reltype="might_have" key="id" map="" class="qxp"/>
5701                 </links>
5702                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5703                 </permacrud>
5704         </class>
5705
5706         <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">
5707                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5708                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5709                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5710                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5711                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5712                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
5713                 </fields>
5714                 <links>
5715                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5716                         <link field="function_id" reltype="might_have" key="id" map="" class="qfs"/>
5717                 </links>
5718                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5719                 </permacrud>
5720         </class>
5721
5722         <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">
5723                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5724                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5725                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5726                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5727                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5728                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
5729                 </fields>
5730                 <links>
5731                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5732                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
5733                 </links>
5734                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5735                 </permacrud>
5736         </class>
5737
5738         <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">
5739                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5740                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5741                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5742                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5743                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5744                 </fields>
5745                 <links>
5746                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5747                 </links>
5748                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5749                 </permacrud>
5750         </class>
5751
5752         <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">
5753                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5754                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5755                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5756                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5757                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5758                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
5759                 </fields>
5760                 <links>
5761                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5762                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
5763                 </links>
5764                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5765                 </permacrud>
5766         </class>
5767
5768         <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">
5769                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5770                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5771                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5772                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5773                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5774                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
5775                 </fields>
5776                 <links>
5777                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5778                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
5779                 </links>
5780                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5781                 </permacrud>
5782         </class>
5783
5784         <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">
5785                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5786                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5787                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5788                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5789                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5790                 </fields>
5791                 <links>
5792                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5793                 </links>
5794                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5795                 </permacrud>
5796         </class>
5797
5798         <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">
5799                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5800                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5801                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5802                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5803                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5804                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
5805                 </fields>
5806                 <links>
5807                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5808                 </links>
5809                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5810                 </permacrud>
5811         </class>
5812
5813         <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">
5814                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5815                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5816                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5817                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5818                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5819                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
5820                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
5821                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
5822                 </fields>
5823                 <links>
5824                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5825                         <link field="left_operand" reltype="might_have" key="id" map="" class="qxp"/>
5826                         <link field="right_operand" reltype="might_have" key="id" map="" class="qxp"/>
5827                 </links>
5828                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5829                 </permacrud>
5830         </class>
5831
5832         <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">
5833                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5834                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5835                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5836                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5837                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5838                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
5839                 </fields>
5840                 <links>
5841                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5842                 </links>
5843                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5844                 </permacrud>
5845         </class>
5846
5847         <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">
5848                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5849                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5850                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5851                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5852                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5853                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
5854                 </fields>
5855                 <links>
5856                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5857                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
5858                 </links>
5859                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5860                 </permacrud>
5861         </class>
5862
5863         <!-- ********************************************************************************************************************* -->
5864         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
5865         <!-- ********************************************************************************************************************* -->
5866         <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">
5867                 <fields oils_persist:primary="id">
5868                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
5869                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
5870                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
5871                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5872                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
5873                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
5874                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
5875                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
5876                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
5877                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
5878                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
5879                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
5880                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
5881                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
5882                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
5883                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
5884                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
5885                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
5886                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
5887                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
5888                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
5889                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
5890                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
5891                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
5892                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
5893                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
5894                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
5895                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
5896                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
5897                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
5898                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
5899                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
5900                 </fields>
5901                 <links>
5902                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
5903                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
5904                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
5905                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
5906                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5907                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
5908                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
5909                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
5910                 </links>
5911         </class>
5912
5913         <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">
5914                 <fields oils_persist:primary="id">
5915                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
5916                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5917                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
5918                 </fields>
5919                 <links>
5920                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5921                 </links>
5922         </class>
5923
5924         <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">
5925                 <fields oils_persist:primary="id">
5926                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
5927                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5928                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
5929                 </fields>
5930                 <links>
5931                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5932                 </links>
5933         </class>
5934
5935         <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">
5936                 <fields oils_persist:primary="id">
5937                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5938
5939                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
5940                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
5941                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
5942
5943                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
5944                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
5945                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
5946
5947                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
5948                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
5949
5950                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5951                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5952                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
5953
5954                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
5955                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
5956
5957                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
5958                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
5959                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
5960
5961                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
5962                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
5963                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
5964
5965                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
5966                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
5967                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
5968                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
5969
5970                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
5971                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
5972
5973                 </fields>
5974                 <links>
5975                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
5976                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5977                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
5978                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5979                 </links>
5980         </class>
5981
5982         <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">
5983                 <oils_persist:source_definition>
5984
5985                         SELECT  t.*
5986                           FROM  action.transit_copy t
5987                                 JOIN actor.org_unit AS s ON (t.source = s.id)
5988                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
5989                           WHERE s.parent_ou &lt;&gt; d.parent_ou
5990
5991                 </oils_persist:source_definition>
5992                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5993                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
5994                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
5995                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5996                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
5997                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
5998                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
5999                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
6000                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6001                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6002                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6003                 </fields>
6004                 <links>
6005                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
6006                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6007                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6008                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6009                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6010                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
6011                 </links>
6012         </class>
6013
6014     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
6015                 <oils_persist:source_definition>
6016
6017         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
6018                 SELECT
6019                         cp.id as copy,
6020                         COUNT(circ.id),
6021                         EXTRACT(YEAR FROM circ.xact_start) AS year,
6022                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
6023                 FROM
6024                         asset.copy cp
6025                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
6026                 GROUP BY 1, 3, 4
6027                 UNION
6028                 SELECT
6029                         cp.id as copy,
6030                         COUNT(circ.id),
6031                         EXTRACT(YEAR FROM circ.xact_start) AS year,
6032                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
6033                 FROM
6034                         asset.copy cp
6035                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
6036                 GROUP BY 1, 3, 4
6037                 UNION
6038                 SELECT
6039                         id as copy,
6040                         circ_count,
6041                         -1 AS year,
6042                         false as is_renewal
6043                 FROM
6044                         extend_reporter.legacy_circ_count
6045         )x GROUP BY 1, 3, 4
6046
6047                 </oils_persist:source_definition>
6048         <fields>
6049             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
6050             <field reporter:label="Count" name="count" reporter:datatype="int"/>
6051             <field reporter:label="Year" name="year" reporter:datatype="int"/>
6052             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
6053         </fields>
6054                 <links>
6055                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
6056                 </links>
6057                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6058                         <actions>
6059                                 <retrieve/>
6060                         </actions>
6061                 </permacrud>
6062     </class>
6063
6064         <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">
6065                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6066                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
6067                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
6068                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
6069                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6070                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
6071                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
6072                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
6073                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
6074                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
6075                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
6076                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
6077                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
6078                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
6079                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
6080                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
6081                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
6082                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
6083                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
6084                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
6085                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
6086                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
6087                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
6088                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
6089                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
6090                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6091                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6092                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6093                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
6094                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
6095                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
6096                 </fields>
6097                 <links>
6098                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6099                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
6100                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
6101                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6102                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
6103                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6104                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6105                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6106                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6107                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6108                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6109                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6110                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
6111                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6112                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6113                 </links>
6114         </class>
6115
6116     <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">
6117         <fields oils_persist:primary="id">
6118             <field reporter:label="Title" name="title" reporter:datatype="text"/>
6119             <field reporter:label="Author" name="author" reporter:datatype="text"/>
6120             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
6121             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6122             <field reporter:label="Price" name="price" reporter:datatype="money"/>
6123             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6124             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
6125             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
6126             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
6127             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
6128             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
6129             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
6130             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
6131             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
6132             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
6133             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
6134             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6135             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6136             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
6137             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
6138             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6139             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6140             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6141             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
6142             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6143             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
6144             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
6145             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
6146             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
6147             <field reporter:label="Status" name="status" reporter:datatype="link"/>
6148             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
6149             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
6150             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
6151             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
6152         </fields>
6153         <links>
6154             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6155             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6156             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6157             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6158             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6159         </links>
6160     </class>
6161
6162     <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">
6163         <fields oils_persist:primary="id">
6164             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
6165             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
6166             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
6167             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
6168         </fields>
6169         <links>
6170             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
6171             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6172         </links>
6173     </class>
6174
6175     <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">
6176         <fields oils_persist:primary="owning_lib">
6177             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
6178             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
6179             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
6180         </fields>
6181         <links>
6182             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6183         </links>
6184     </class>
6185
6186     <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">
6187         <fields oils_persist:primary="id">
6188             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
6189             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
6190             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
6191             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
6192             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
6193         </fields>
6194         <links>
6195             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
6196             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6197             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6198         </links>
6199     </class>
6200
6201     <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">
6202         <fields oils_persist:primary="circ_lib">
6203             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
6204             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
6205             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
6206             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
6207         </fields>
6208         <links>
6209             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6210             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6211         </links>
6212     </class>
6213
6214     <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">
6215         <fields oils_persist:primary="id">
6216             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
6217             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
6218             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
6219             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
6220             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
6221         </fields>
6222         <links>
6223             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
6224             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6225             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
6226         </links>
6227     </class>
6228
6229     <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">
6230         <fields oils_persist:primary="home_ou">
6231             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
6232             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
6233             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
6234             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
6235         </fields>
6236         <links>
6237             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6238             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
6239         </links>
6240     </class>
6241         <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">
6242                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
6243                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
6244                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
6245                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
6246                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6247                 </fields>
6248                 <links>
6249                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6250                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
6251                 </links>
6252                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6253                         <actions>
6254                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
6255                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
6256                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
6257                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
6258                         </actions>
6259                 </permacrud>
6260         </class>
6261         <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">
6262                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
6263                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
6264                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
6265                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
6266                 </fields>
6267                 <links>
6268                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6269                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
6270                         </links>
6271                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6272                 <actions>
6273                                 <create permission="ADMIN_ACQ_FUND_TAG">
6274                                         <context link="tag" field="owner"/>
6275                                 </create>
6276                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
6277                                         <context link="tag" field="owner"/>
6278                                 </retrieve>
6279                                 <update permission="ADMIN_ACQ_FUND_TAG">
6280                                         <context link="tag" field="owner"/>
6281                                 </update>
6282                                 <delete permission="ADMIN_ACQ_FUND_TAG">
6283                                         <context link="tag" field="owner"/>
6284                                 </delete>
6285                         </actions>
6286                 </permacrud>
6287         </class>
6288
6289         <!-- ********************************************************************************************************************* -->
6290
6291 </IDL>
6292
6293 <!--
6294     vim:noet:ts=4:sw=4:
6295 -->