]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
adding org unit settings to block or provide default elbow room for circs; logic...
[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="Inter-booking Interval" name="elbow_room" reporter:datatype="interval"/>
2511                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
2512                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
2513                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
2514                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
2515                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
2516                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
2517                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
2518                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
2519                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2520                 </fields>
2521                 <links>
2522                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2523                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2524                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2525                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2526                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2527                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
2528                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
2529                         <link field="target_resource" reltype="might_have" key="id" map="" class="brsrc"/>
2530                         <link field="current_resource" reltype="might_have" key="id" map="" class="brsrc"/>
2531                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
2532                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
2533                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
2534                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
2535                 </links>
2536                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2537                         <actions>
2538                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
2539                                 <retrieve />
2540                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
2541                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
2542                         </actions>
2543                 </permacrud>
2544         </class>
2545         
2546         <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">
2547                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
2548                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
2549                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
2550                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
2551                 </fields>
2552                 <links>
2553                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
2554                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
2555                 </links>
2556                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2557                         <actions>
2558                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
2559                                 <retrieve />
2560                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
2561                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
2562                         </actions>
2563                 </permacrud>
2564         </class>
2565
2566         <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">
2567                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
2568                         <field name="bucket" reporter:datatype="link"/>
2569                         <field name="id" reporter:datatype="id" />
2570                         <field name="target_call_number" reporter:datatype="link" />
2571                         <field name="create_time" reporter:datatype="timestamp" />
2572                         <field name="pos" reporter:datatype="int" />
2573                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2574                 </fields>
2575                 <links>
2576                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
2577                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
2578             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
2579                 </links>
2580         </class>
2581         <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">
2582                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
2583                         <field name="id" reporter:datatype="id" />
2584                         <field name="item" reporter:datatype="link"/>
2585                         <field name="note" reporter:datatype="text" />
2586                 </fields>
2587                 <links>
2588                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
2589                 </links>
2590         </class>
2591         <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">
2592                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
2593                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
2594                         <field name="btype" reporter:datatype="text"/>
2595                         <field name="id" reporter:datatype="id" />
2596                         <field name="name" reporter:datatype="text"/>
2597                         <field name="owner" reporter:datatype="link"/>
2598                         <field name="pub" reporter:datatype="bool"/>
2599                         <field name="create_time" reporter:datatype="timestamp" />
2600                 </fields>
2601                 <links>
2602                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
2603                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
2604                 </links>
2605         </class>
2606         <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">
2607                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
2608                         <field name="id" reporter:datatype="id" />
2609                         <field name="bucket" reporter:datatype="link"/>
2610                         <field name="note" reporter:datatype="text" />
2611                 </fields>
2612                 <links>
2613                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
2614                 </links>
2615         </class>
2616         <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">
2617                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
2618                         <field name="hold" reporter:datatype="link"/>
2619                         <field name="id" reporter:datatype="id" />
2620                         <field name="target_copy" reporter:datatype="link"/>
2621                 </fields>
2622                 <links>
2623                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
2624                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2625                 </links>
2626         </class>
2627         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
2628                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
2629                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
2630                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
2631                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
2632                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
2633                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
2634                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
2635                 </fields>
2636                 <links>
2637                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
2638                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
2639                 </links>
2640         </class>
2641         <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">
2642                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
2643                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
2644                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
2645                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
2646                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2647                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2648                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
2649                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
2650                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
2651                 </fields>
2652                 <links>
2653                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2654                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
2655                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
2656                 </links>
2657         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2658             <actions>
2659                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
2660                 <retrieve/>
2661                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
2662                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
2663             </actions>
2664         </permacrud>
2665         </class>
2666
2667     <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">
2668         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
2669             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
2670             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
2671             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
2672             <field reporter:label="Position" name="position" reporter:datatype="int"/>
2673         </fields>
2674         <links>
2675             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
2676             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
2677         </links>
2678         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2679             <actions>
2680                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
2681                 <retrieve/>
2682                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
2683                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
2684             </actions>
2685         </permacrud>
2686     </class>
2687
2688         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
2689                 <fields>
2690                         <field name="id" oils_persist:virtual="true" />
2691                         <field name="location" oils_persist:virtual="true" />
2692                         <field name="owning_lib" oils_persist:virtual="true" />
2693                         <field name="holdings" oils_persist:virtual="true" />
2694                         <field name="current_holdings" oils_persist:virtual="true" />
2695                         <field name="supplements" oils_persist:virtual="true" />
2696                         <field name="current_supplements" oils_persist:virtual="true" />
2697                         <field name="indexes" oils_persist:virtual="true" />
2698                         <field name="current_indexes" oils_persist:virtual="true" />
2699                         <field name="online" oils_persist:virtual="true" />
2700                         <field name="missing" oils_persist:virtual="true" />
2701                         <field name="incomplete" oils_persist:virtual="true" />
2702                 </fields>
2703         </class>
2704         <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">
2705                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
2706                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
2707                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2708                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
2709                         <field reporter:label="Creator" name="creator" />
2710                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2711                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
2712                         <field reporter:label="Editor" name="editor" />
2713                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2714                         <field reporter:label="Last Transaction ID" name="last_xact_id" />
2715                         <field reporter:label="MARC" name="marc" />
2716                         <field reporter:label="Source" name="source" />
2717                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
2718                 </fields>
2719                 <links>
2720                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2721                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2722                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2723                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2724                 </links>
2725                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2726                         <actions>
2727                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
2728                                 <retrieve/>
2729                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
2730                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
2731                         </actions>
2732                 </permacrud>
2733         </class>
2734         <class id="ssub" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
2735                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
2736                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
2737                         <field reporter:label="Call Number" name="call_number" reporter:datatype="link"/>
2738                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
2739                         <field reporter:label="Start date" name="start_date" reporter:datatype="timestamp"/>
2740                         <field reporter:label="End date" name="end_date" reporter:datatype="timestamp"/>
2741                 </fields>
2742                 <links>
2743                         <link field="call_number" reltype="might_have" key="id" map="" class="acn"/>
2744                         <link field="uri" reltype="might_have" key="id" map="" class="auri"/>
2745                 </links>
2746         </class>
2747         <class id="sbu" controller="open-ils.cstore" oils_obj:fieldmapper="serial::binding_unit" oils_persist:tablename="serial.binding_unit" reporter:label="Binding Unit">
2748                 <fields oils_persist:primary="id" oils_persist:sequence="serial.binding_unit_id_seq">
2749                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
2750                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
2751                         <field reporter:label="Label" name="label" />
2752                 </fields>
2753                 <links>
2754                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2755                 </links>
2756         </class>
2757         <class id="siss" controller="open-ils.cstore" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
2758                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
2759                         <field name="id" reporter:datatype="id" />
2760                         <field name="subscription" reporter:datatype="link"/>
2761                         <field name="target_copy" reporter:datatype="link"/>
2762                         <field name="location" reporter:datatype="link"/>
2763                         <field name="binding_unit" reporter:datatype="link"/>
2764                         <field name="label" />
2765                 </fields>
2766                 <links>
2767                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2768                         <link field="target_copy" reltype="might_have" key="id" map="" class="acp"/>
2769                         <link field="location" reltype="might_have" key="id" map="" class="acpl"/>
2770                         <link field="binding_unit" reltype="might_have" key="id" map="" class="sbu"/>
2771                 </links>
2772         </class>
2773         <class id="sbsum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::bib_summary" oils_persist:tablename="serial.bib_summary" reporter:label="Bib Summary">
2774                 <fields oils_persist:primary="id" oils_persist:sequence="serial.bib_summary_id_seq">
2775                         <field name="id" reporter:datatype="id" />
2776                         <field name="subscription" reporter:datatype="link"/>
2777                         <field name="generated_coverage" reporter:datatype="text"/>
2778                         <field name="textual_holdings" reporter:datatype="text"/>
2779                 </fields>
2780                 <links>
2781                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2782                 </links>
2783         </class>
2784         <class id="sssum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::sup_summary" oils_persist:tablename="serial.sup_summary" reporter:label="Supplemental Issue Summary">
2785                 <fields oils_persist:primary="id" oils_persist:sequence="serial.sup_summary_id_seq">
2786                         <field name="id" reporter:datatype="id" />
2787                         <field name="subscription" reporter:datatype="link"/>
2788                         <field name="generated_coverage" reporter:datatype="text"/>
2789                         <field name="textual_holdings" reporter:datatype="text"/>
2790                 </fields>
2791                 <links>
2792                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2793                 </links>
2794         </class>
2795         <class id="sisum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::index_summary" oils_persist:tablename="serial.index_summary" reporter:label="Index Summary">
2796                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
2797                         <field name="id" reporter:datatype="id" />
2798                         <field name="subscription" reporter:datatype="link"/>
2799                         <field name="generated_coverage" reporter:datatype="text"/>
2800                         <field name="textual_holdings" reporter:datatype="text"/>
2801                 </fields>
2802                 <links>
2803                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2804                 </links>
2805         </class>
2806
2807         <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">
2808                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
2809                         <field name="id" reporter:datatype="id" />
2810                         <field name="owning_copy" reporter:datatype="link"/>
2811                         <field name="stat_cat" reporter:datatype="link"/>
2812                         <field name="stat_cat_entry" reporter:datatype="link"/>
2813                 </fields>
2814                 <links>
2815                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2816                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
2817                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
2818                 </links>
2819         </class>
2820         <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">
2821                 <fields oils_persist:primary="code">
2822                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2823                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2824                 </fields>
2825                 <links/>
2826         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2827             <actions>
2828                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2829                 <retrieve/>
2830                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2831                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2832             </actions>
2833         </permacrud>
2834         </class>
2835         <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">
2836                 <fields oils_persist:primary="code">
2837                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
2838                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2839                 </fields>
2840                 <links/>
2841         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2842             <actions>
2843                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2844                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
2845                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2846                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2847             </actions>
2848         </permacrud>
2849         </class>
2850         <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">
2851                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
2852                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
2853                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
2854                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
2855                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
2856                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
2857                 </fields>
2858                 <links>
2859             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2860         </links>
2861         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2862             <actions>
2863                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
2864                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
2865                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
2866                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
2867             </actions>
2868         </permacrud>
2869         </class>
2870         <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">
2871                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
2872                         <field name="id" reporter:datatype="id" />
2873                         <field name="name" reporter:datatype="text"/>
2874                 </fields>
2875                 <links/>
2876         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2877             <actions>
2878                 <create permission="CREATE_LASSO" global_required="true"/>
2879                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
2880                 <update permission="UPDATE_LASSO" global_required="true"/>
2881                 <delete permission="DELETE_LASSO" global_required="true"/>
2882             </actions>
2883         </permacrud>
2884         </class>
2885         <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">
2886                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
2887                         <field name="id" reporter:datatype="id" />
2888                         <field name="lasso" reporter:datatype="link"/>
2889                         <field name="org_unit" reporter:datatype="org_unit"/>
2890                 </fields>
2891                 <links>
2892                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
2893                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2894                 </links>
2895         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2896             <actions>
2897                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
2898                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
2899                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
2900                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
2901             </actions>
2902         </permacrud>
2903         </class>
2904         <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">
2905                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
2906                         <field name="id" reporter:datatype="id" />
2907                         <field name="from_org" reporter:datatype="org_unit"/>
2908                         <field name="to_org" reporter:datatype="org_unit"/>
2909                         <field name="prox" reporter:datatype="int" />
2910                 </fields>
2911                 <links>
2912                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
2913                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
2914                 </links>
2915         </class>
2916         <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">
2917                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
2918                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2919                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
2920                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
2921                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
2922                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
2923                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
2924                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
2925                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
2926                 </fields>
2927                 <links/>
2928         </class>
2929         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
2930                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
2931                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
2932                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2933                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2934                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
2935                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
2936                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2937                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
2938                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2939                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
2940                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
2941                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
2942                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
2943                 </fields>
2944                 <links>
2945                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2946                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
2947                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
2948                 </links>
2949         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2950             <actions>
2951                 <create permission="ADMIN_SURVEY" context_field="owner"/>
2952                 <retrieve/>
2953                 <update permission="ADMIN_SURVEY" context_field="owner"/>
2954                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
2955             </actions>
2956         </permacrud>
2957         </class>
2958         <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">
2959                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
2960                         <field name="address_type"  reporter:datatype="text"/>
2961                         <field name="city"  reporter:datatype="text"/>
2962                         <field name="country"  reporter:datatype="text"/>
2963                         <field name="county"  reporter:datatype="text"/>
2964                         <field name="id" reporter:datatype="id" />
2965                         <field name="org_unit" reporter:datatype="org_unit"/>
2966                         <field name="post_code"  reporter:datatype="text"/>
2967                         <field name="state"  reporter:datatype="text"/>
2968                         <field name="street1"  reporter:datatype="text"/>
2969                         <field name="street2"  reporter:datatype="text"/>
2970                         <field name="valid" reporter:datatype="bool"/>
2971                 </fields>
2972                 <links>
2973                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2974                 </links>
2975         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2976             <actions>
2977                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
2978                 <retrieve/>
2979                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
2980                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
2981             </actions>
2982         </permacrud>
2983         </class>
2984         <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">
2985                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
2986                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
2987                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
2988                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
2989                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
2990                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
2991                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
2992                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
2993                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
2994                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
2995                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
2996                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
2997                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
2998                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
2999                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
3000                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
3001                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
3002                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
3003                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
3004                         <field reporter:label="Item Selection Depth" name="selection_depth" />
3005                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
3006                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
3007                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
3008                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
3009                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
3010                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
3011                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
3012                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
3013                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
3014                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
3015                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
3016                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
3017                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
3018                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
3019                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
3020                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
3021                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
3022                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
3023                 </fields>
3024                 <links>
3025                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
3026                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
3027                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
3028                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
3029                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
3030                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
3031                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3032                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3033                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
3034                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
3035                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
3036                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
3037                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
3038                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
3039                 </links>
3040         </class>
3041         <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">
3042                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
3043                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3044                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
3045                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3046                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
3047                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
3048                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
3049                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
3050                 </fields>
3051                 <links>
3052                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3053                 </links>
3054                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3055                         <actions>
3056                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
3057                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
3058                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
3059                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
3060                         </actions>
3061                 </permacrud>
3062         </class>
3063         <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">
3064                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
3065                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3066                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
3067                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
3068                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
3069                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
3070                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3071                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3072                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
3073                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
3074                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text"/>
3075                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
3076                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
3077                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3078                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
3079                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
3080                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3081                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3082                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3083                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3084                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
3085                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3086                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
3087                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
3088                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3089                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
3090                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3091                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3092                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3093                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
3094                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
3095                 </fields>
3096                 <links>
3097                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
3098                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
3099                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
3100                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
3101                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
3102                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
3103                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
3104                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
3105                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
3106                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
3107                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
3108                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
3109                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
3110                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
3111                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
3112                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
3113                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
3114                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
3115                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
3116                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
3117                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
3118                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
3119                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
3120                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
3121                 </links>
3122         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3123             <actions>
3124                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
3125                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
3126                     <context field="id"/>
3127                     <context field="parent_ou"/>
3128                                 </retrieve>
3129                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
3130                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
3131             </actions>
3132         </permacrud>
3133         </class>
3134         <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">
3135                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
3136                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3137                         <field name="btype" reporter:datatype="text"/>
3138                         <field name="id" reporter:datatype="id" />
3139                         <field name="name"  reporter:datatype="text"/>
3140                         <field name="owner" reporter:datatype="link"/>
3141                         <field name="pub" reporter:datatype="bool"/>
3142                         <field name="create_time" reporter:datatype="timestamp" />
3143                 </fields>
3144                 <links>
3145                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3146                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
3147                 </links>
3148         </class>
3149         <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">
3150                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
3151                         <field name="id" reporter:datatype="id" />
3152                         <field name="bucket" reporter:datatype="link"/>
3153                         <field name="note" reporter:datatype="text" />
3154                 </fields>
3155                 <links>
3156                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3157                 </links>
3158         </class>
3159         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
3160                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
3161                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
3162                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3163                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3164                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3165                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3166                 </fields>
3167                 <links>
3168                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3169                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
3170                 </links>
3171         </class>
3172         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
3173                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
3174                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
3175                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3176                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
3177                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3178                 </fields>
3179                 <links>
3180                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3181                 </links>
3182         </class>
3183         <class id="actsc" controller="open-ils.cstore" oils_obj:fieldmapper="actor::stat_cat" oils_persist:tablename="actor.stat_cat" reporter:label="User Statistical Category">
3184                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
3185                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
3186                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3187                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3188                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3189                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3190                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
3191                 </fields>
3192                 <links>
3193                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3194                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
3195                 </links>
3196         </class>
3197         <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">
3198                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
3199                         <field name="field" reporter:datatype="link"/>
3200                         <field name="id" reporter:datatype="id" />
3201                         <field name="source" reporter:datatype="link"/>
3202                         <field name="value"  reporter:datatype="text"/>
3203                 </fields>
3204                 <links>
3205                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3206                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3207                 </links>
3208         </class>
3209         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
3210                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
3211                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3212                         <field name="btype" reporter:datatype="text"/>
3213                         <field name="id" reporter:datatype="id" />
3214                         <field name="name"  reporter:datatype="text"/>
3215                         <field name="owner" reporter:datatype="link"/>
3216                         <field name="pub" reporter:datatype="bool"/>
3217                         <field name="create_time" reporter:datatype="timestamp" />
3218                 </fields>
3219                 <links>
3220                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3221                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
3222                 </links>
3223         </class>
3224         <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">
3225                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
3226                         <field name="id" reporter:datatype="id" />
3227                         <field name="bucket" reporter:datatype="link"/>
3228                         <field name="note" reporter:datatype="text" />
3229                 </fields>
3230                 <links>
3231                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
3232                 </links>
3233         </class>
3234         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
3235                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3236                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3237                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3238                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3239                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
3240                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
3241                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3242                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
3243                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3244                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3245                 </fields>
3246                 <links>
3247                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3248                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3249                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3250                 </links>
3251         </class>
3252         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
3253                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
3254                         <field name="id" reporter:datatype="id" />
3255                         <field name="ind1" />
3256                         <field name="ind2" />
3257                         <field name="record" />
3258                         <field name="subfield" />
3259                         <field name="tag" />
3260                         <field name="value" />
3261                 </fields>
3262                 <links>
3263                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3264                 </links>
3265         </class>
3266         <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">
3267                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
3268                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
3269                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3270                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
3271                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3272                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3273                 </fields>
3274                 <links>
3275                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3276                 </links>
3277         </class>
3278         <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">
3279                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
3280                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
3281                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
3282                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
3283                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
3284                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3285                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3286                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
3287                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
3288                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
3289                 </fields>
3290                 <links>
3291                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
3292                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
3293                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
3294                 </links>
3295         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3296             <actions>
3297                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
3298                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT" global_required="true"/>
3299                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
3300                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
3301             </actions>
3302         </permacrud>
3303         </class>
3304         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
3305                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
3306                         <field name="create_date" reporter:datatype="timestamp"/>
3307                         <field name="creator" reporter:datatype="link"/>
3308                         <field name="edit_date" reporter:datatype="timestamp"/>
3309                         <field name="editor" reporter:datatype="link"/>
3310                         <field name="id" reporter:datatype="id" />
3311                         <field name="pub" reporter:datatype="bool"/>
3312                         <field name="record" reporter:datatype="link"/>
3313                         <field name="value"  reporter:datatype="text"/>
3314                 </fields>
3315                 <links>
3316                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3317                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3318                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3319                 </links>
3320         </class>
3321         <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">
3322                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3323                         <field name="balance_owed" reporter:datatype="money" />
3324                         <field name="total_owed" reporter:datatype="money" />
3325                         <field name="total_paid" reporter:datatype="money" />
3326                         <field name="usr" reporter:datatype="link"/>
3327                 </fields>
3328                 <links>
3329                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3330                 </links>
3331         </class>
3332         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
3333                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3334                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
3335                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3336                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
3337                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3338                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
3339                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
3340                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3341                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3342                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3343                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3344                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3345                 </fields>
3346                 <links>
3347                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3348                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3349                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3350                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3351                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3352                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3353                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3354                 </links>
3355         </class>
3356         <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">
3357                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
3358                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
3359                         <field name="quality" reporter:datatype="int" />
3360                         <field name="source" reporter:datatype="text"/>
3361                         <field name="transcendant" reporter:datatype="bool"/>
3362                 </fields>
3363                 <links/>
3364         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3365             <actions>
3366                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
3367                 <retrieve/>
3368                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
3369                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
3370             </actions>
3371         </permacrud>
3372         </class>
3373         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
3374                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3375                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3376                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3377                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3378                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3379                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3380                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3381                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3382                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3383                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3384                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3385                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3386                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3387                 </fields>
3388                 <links>
3389                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3390                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3391                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3392                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3393                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3394                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3395                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3396                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3397                 </links>
3398         </class>
3399         <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">
3400                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
3401                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
3402                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
3403                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
3404                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
3405                 </fields>
3406                 <links>
3407                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
3408                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3409                 </links>
3410         </class>
3411         <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">
3412                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
3413                         <field name="bucket" reporter:datatype="link"/>
3414                         <field name="id" reporter:datatype="id" />
3415                         <field name="target_user" reporter:datatype="link"/>
3416                         <field name="create_time" reporter:datatype="timestamp" />
3417                         <field name="pos" reporter:datatype="int" />
3418                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3419                 </fields>
3420                 <links>
3421                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
3422                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
3423             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
3424                 </links>
3425         </class>
3426         <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">
3427                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
3428                         <field name="id" reporter:datatype="id" />
3429                         <field name="item" reporter:datatype="link"/>
3430                         <field name="note" reporter:datatype="text" />
3431                 </fields>
3432                 <links>
3433                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
3434                 </links>
3435         </class>
3436         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
3437                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3438                         <field name="balance_owed" reporter:datatype="money" />
3439                         <field name="total_owed" reporter:datatype="money" />
3440                         <field name="total_paid" reporter:datatype="money" />
3441                         <field name="usr" reporter:datatype="link"/>
3442                 </fields>
3443                 <links>
3444                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3445                 </links>
3446         </class>
3447         <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">
3448                 <fields oils_persist:primary="code" oils_persist:sequence="">
3449                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
3450                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3451                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
3452                 </fields>
3453                 <links/>
3454         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3455             <actions>
3456                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3457                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
3458                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3459                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3460             </actions>
3461         </permacrud>
3462         </class>
3463         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
3464                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3465                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3466                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3467                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3468                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3469                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3470                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3471                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
3472                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3473                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3474                 </fields>
3475                 <links>
3476                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3477                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3478                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3479                 </links>
3480         </class>
3481         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
3482                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3483                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3484                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3485                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3486                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3487                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3488                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3489                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
3490                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3491                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3492                 </fields>
3493                 <links>
3494                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3495                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3496                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3497                 </links>
3498         </class>
3499         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
3500                 <fields oils_persist:primary="id" oils_persist:sequence="">
3501                         <field name="checkin_lib" reporter:datatype="link"/>
3502                         <field name="checkin_staff" reporter:datatype="link"/>
3503                         <field name="checkin_time" reporter:datatype="timestamp"/>
3504                         <field name="circ_lib"  reporter:datatype="org_unit"/>
3505                         <field name="circ_staff" reporter:datatype="link"/>
3506                         <field name="desk_renewal" reporter:datatype="bool"/>
3507                         <field name="due_date" reporter:datatype="timestamp"/>
3508                         <field name="duration" reporter:datatype="interval"/>
3509                         <field name="duration_rule" reporter:datatype="link"/>
3510                         <field name="fine_interval" reporter:datatype="interval"/>
3511                         <field name="id" reporter:datatype="id" />
3512                         <field name="max_fine" reporter:datatype="money" />
3513                         <field name="max_fine_rule" reporter:datatype="link"/>
3514                         <field name="opac_renewal" reporter:datatype="bool"/>
3515                         <field name="phone_renewal" reporter:datatype="bool"/>
3516                         <field name="recurring_fine" reporter:datatype="money" />
3517                         <field name="recurring_fine_rule" reporter:datatype="link"/>
3518                         <field name="renewal_remaining" reporter:datatype="int" />
3519                         <field name="stop_fines" reporter:datatype="text"/>
3520                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
3521                         <field name="target_copy" reporter:datatype="link"/>
3522                         <field name="usr" reporter:datatype="link"/>
3523                         <field name="xact_finish" reporter:datatype="timestamp" />
3524                         <field name="xact_start" reporter:datatype="timestamp" />
3525                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3526                 </fields>
3527                 <links>
3528                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3529                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3530                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3531                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3532                 </links>
3533         </class>
3534         <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">
3535                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
3536                         <field name="field" reporter:datatype="link"/>
3537                         <field name="id" reporter:datatype="id" />
3538                         <field name="source" reporter:datatype="link"/>
3539                         <field name="value" reporter:datatype="text"/>
3540                 </fields>
3541                 <links>
3542                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3543                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3544                 </links>
3545         </class>
3546         <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">
3547                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
3548                         <field name="high" reporter:datatype="money" />
3549                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3550                         <field name="low" reporter:datatype="money" />
3551                         <field name="name" reporter:datatype="text"/>
3552                         <field name="normal" reporter:datatype="money" />
3553                         <field name="recurrence_interval" reporter:datatype="interval"/>
3554                 </fields>
3555                 <links/>
3556         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3557             <actions>
3558                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
3559                 <retrieve/>
3560                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
3561                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
3562             </actions>
3563         </permacrud>
3564         </class>
3565         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
3566                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3567                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3568                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3569                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3570                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
3571                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
3572                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3573                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3574                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3575                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
3576                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3577                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3578                 </fields>
3579                 <links>
3580                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3581                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3582                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3583                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3584                 </links>
3585         </class>
3586         <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">
3587                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
3588                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3589                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
3590                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
3591                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3592                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
3593                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
3594                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3595                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
3596                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
3597                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
3598                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3599                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3600                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3601                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
3602                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3603                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
3604                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
3605                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
3606                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3607                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3608                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
3609                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
3610                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
3611                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
3612                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
3613                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
3614                         <field reporter:label="Price" name="price" reporter:datatype="money" />
3615                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
3616                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
3617                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
3618                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
3619                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
3620                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3621                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3622                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3623                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
3624                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3625                 </fields>
3626                 <links>
3627                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
3628                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3629                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3630                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3631                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3632                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
3633                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3634                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
3635                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
3636                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
3637                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
3638                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
3639                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
3640                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
3641                 </links>
3642         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3643             <actions>
3644                 <create permission="CREATE_COPY">
3645                     <context link="call_number" field="owning_lib"/>
3646                 </create>
3647                 <retrieve/>
3648                 <update permission="UPDATE_COPY">
3649                     <context link="call_number" field="owning_lib"/>
3650                 </update>
3651                 <delete permission="DELETE_COPY">
3652                     <context link="call_number" field="owning_lib"/>
3653                 </delete>
3654             </actions>
3655         </permacrud>
3656         </class>
3657         <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">
3658                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
3659                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
3660                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3661                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
3662                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
3663                 </fields>
3664                 <links/>
3665         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3666             <actions>
3667                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
3668                 <retrieve/>
3669                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
3670                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
3671             </actions>
3672         </permacrud>
3673         </class>
3674         <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">
3675                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
3676                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
3677                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3678                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
3679                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
3680                 </fields>
3681                 <links/>
3682         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3683             <actions>
3684                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
3685                 <retrieve/>
3686                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
3687                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
3688             </actions>
3689         </permacrud>
3690         </class>
3691         <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">
3692                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
3693                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
3694                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3695                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3696                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3697                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
3698                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
3699                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
3700                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
3701                 </fields>
3702                 <links>
3703                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
3704                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
3705                 </links>
3706         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3707             <actions>
3708                 <create permission="CREATE_PERM" global_required="true"/>
3709                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
3710                 <update permission="UPDATE_PERM" global_required="true"/>
3711                 <delete permission="DELETE_PERM" global_required="true"/>
3712             </actions>
3713         </permacrud>
3714         </class>
3715         <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">
3716                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
3717                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
3718                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
3719                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
3720                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
3721                 </fields>
3722                 <links>
3723                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
3724                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
3725                 </links>
3726         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3727             <actions>
3728                 <create permission="ADMIN_SURVEY">
3729                     <context link="question" jump="survey" field="owner"/>
3730                 </create>
3731                 <retrieve/>
3732                 <update permission="ADMIN_SURVEY">
3733                     <context link="question" jump="survey" field="owner"/>
3734                 </update>
3735                 <delete permission="ADMIN_SURVEY">
3736                     <context link="question" jump="survey" field="owner"/>
3737                 </delete>
3738             </actions>
3739         </permacrud>
3740         </class>
3741         <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">
3742                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
3743                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3744                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
3745                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
3746                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
3747                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
3748                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
3749                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
3750                 </fields>
3751                 <links>
3752                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
3753                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3754                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
3755                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3756                 </links>
3757         </class>
3758         <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">
3759                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3760                         <field name="balance_owed" reporter:datatype="money" />
3761                         <field name="total_owed" reporter:datatype="money" />
3762                         <field name="total_paid" reporter:datatype="money" />
3763                         <field name="usr" reporter:datatype="link"/>
3764                 </fields>
3765                 <links>
3766                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3767                 </links>
3768         </class>
3769         <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">
3770                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
3771                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
3772                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
3773                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
3774                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
3775                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3776                 </fields>
3777                 <links>
3778                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3779                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
3780                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3781                 </links>
3782         </class>
3783         <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">
3784                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
3785                         <field name="field" reporter:datatype="link"/>
3786                         <field name="id" reporter:datatype="id" />
3787                         <field name="source" reporter:datatype="link"/>
3788                         <field name="value" reporter:datatype="text"/>
3789                 </fields>
3790                 <links>
3791                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3792                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3793                 </links>
3794         </class>
3795         <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">
3796                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
3797                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
3798                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
3799                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
3800                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
3801                 </fields>
3802                 <links>
3803                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
3804                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
3805                 </links>
3806         </class>
3807         <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">
3808                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
3809                         <field name="depth" reporter:datatype="int" />
3810                         <field name="grantable" reporter:datatype="bool"/>
3811                         <field name="grp" reporter:datatype="link"/>
3812                         <field name="id" reporter:datatype="id" />
3813                         <field name="perm" reporter:datatype="link"/>
3814                 </fields>
3815                 <links>
3816                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3817                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
3818                 </links>
3819         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3820             <actions>
3821                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
3822                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
3823                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
3824                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
3825             </actions>
3826         </permacrud>
3827         </class>
3828         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
3829                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
3830                         <field name="items" oils_persist:virtual="true" />
3831                         <field name="btype" reporter:datatype="text"/>
3832                         <field name="id" reporter:datatype="id" />
3833                         <field name="name" reporter:datatype="text"/>
3834                         <field name="owner" reporter:datatype="link"/>
3835                         <field name="pub" reporter:datatype="bool"/>
3836                         <field name="create_time" reporter:datatype="timestamp" />
3837                 </fields>
3838                 <links>
3839                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3840                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
3841                 </links>
3842         </class>
3843         <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">
3844                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
3845                         <field name="id" reporter:datatype="id" />
3846                         <field name="bucket" reporter:datatype="link"/>
3847                         <field name="note" reporter:datatype="text" />
3848                 </fields>
3849                 <links>
3850                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
3851                 </links>
3852         </class>
3853         <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">
3854                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
3855                         <field name="id" reporter:datatype="int" />
3856                         <field name="usr" reporter:datatype="link"/>
3857                         <field name="work_ou" reporter:datatype="link"/>
3858                 </fields>
3859                 <links>
3860                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3861                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
3862                 </links>
3863         </class>
3864         <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">
3865                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
3866                         <field name="depth" reporter:datatype="int"/>
3867                         <field name="grantable" reporter:datatype="bool"/>
3868                         <field name="id" reporter:datatype="id" />
3869                         <field name="perm" reporter:datatype="link"/>
3870                         <field name="usr" reporter:datatype="link"/>
3871                 </fields>
3872                 <links>
3873                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3874                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
3875                 </links>
3876         </class>
3877         <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">
3878                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
3879                         <field name="object_id" reporter:datatype="text"/>
3880                         <field name="grantable" reporter:datatype="bool"/>
3881                         <field name="id" reporter:datatype="id" />
3882                         <field name="perm" reporter:datatype="link"/>
3883                         <field name="usr" reporter:datatype="link"/>
3884                         <field name="object_type" reporter:datatype="text"/>
3885                 </fields>
3886                 <links>
3887                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3888                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
3889                 </links>
3890         </class>
3891         <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">
3892                 <fields oils_persist:primary="id" oils_persist:sequence="">
3893                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3894                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3895                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3896                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
3897                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
3898                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
3899                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
3900                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3901                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3902                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3903                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3904                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3905                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3906                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3907                 </fields>
3908                 <links>
3909                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
3910                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
3911                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
3912                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
3913                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
3914                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
3915                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
3916                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3917                 </links>
3918         </class>
3919         <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">
3920                 <fields oils_persist:primary="id" oils_persist:sequence="">
3921                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3922                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3923                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3924                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
3925                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
3926                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
3927                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
3928                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3929                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3930                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3931                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3932                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3933                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3934                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3935                 </fields>
3936                 <links>
3937                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
3938                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
3939                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
3940                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
3941                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
3942                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
3943                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
3944                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3945                 </links>
3946         </class>
3947         <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">
3948                 <fields oils_persist:primary="id" oils_persist:sequence="">
3949                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3950                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3951                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3952                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
3953                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
3954                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
3955                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
3956                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3957                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3958                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3959                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3960                 </fields>
3961                 <links>
3962                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
3963                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
3964                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
3965                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
3966                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3967                 </links>
3968         </class>
3969         <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">
3970                 <fields oils_persist:primary="id" oils_persist:sequence="">
3971                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3972                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3973                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3974                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
3975                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
3976                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
3977                         <field reporter:label="Accepting User" name="accepting_usr" />
3978                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
3979                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
3980                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3981                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3982                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3983                 </fields>
3984                 <links>
3985                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
3986                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
3987                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
3988                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3989                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3990                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3991                 </links>
3992         </class>
3993         <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">
3994                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
3995                         <field name="bucket" reporter:datatype="link"/>
3996                         <field name="id" reporter:datatype="id" />
3997                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
3998                         <field name="create_time" reporter:datatype="timestamp" />
3999                         <field name="pos" reporter:datatype="int" />
4000                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4001                 </fields>
4002                 <links>
4003                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
4004                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4005             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
4006                 </links>
4007         </class>
4008         <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">
4009                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
4010                         <field name="id" reporter:datatype="id" />
4011                         <field name="item" reporter:datatype="link"/>
4012                         <field name="note" reporter:datatype="text" />
4013                 </fields>
4014                 <links>
4015                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
4016                 </links>
4017         </class>
4018         <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">
4019                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
4020                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
4021                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
4022                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
4023                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
4024                 </fields>
4025                 <links>
4026                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4027                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4028                 </links>
4029         </class>
4030
4031         <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">
4032                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
4033                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
4034                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
4035                 </fields>
4036                 <links/>
4037         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4038             <actions>
4039                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4040                 <retrieve/>
4041                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4042                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4043             </actions>
4044         </permacrud>
4045         </class>
4046
4047
4048         <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">
4049                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
4050                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
4051                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
4052                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
4053                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
4054                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
4055                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
4056                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
4057                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
4058                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
4059                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
4060                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
4061                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
4062                 </fields>
4063                 <links>
4064                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
4065                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4066                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
4067                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
4068                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
4069                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
4070                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4071                 </links>
4072         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4073             <actions>
4074                 <create permission="TRANSIT_COPY" context_field="owner">
4075                     <context link="target_copy" field="circ_lib"/>
4076                 </create>
4077                 <retrieve/>
4078                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
4079                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
4080             </actions>
4081         </permacrud>
4082         </class>
4083         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
4084                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
4085                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4086                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
4087                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
4088                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
4089                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4090                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
4091                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4092                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
4093                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
4094                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
4095                 </fields>
4096                 <links>
4097                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4098                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
4099                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
4100                 </links>
4101         </class>
4102         <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">
4103                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
4104                         <field name="grp" />
4105                         <field name="id" reporter:datatype="id" />
4106                         <field name="usr" />
4107                 </fields>
4108                 <links>
4109                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4110                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4111                 </links>
4112         </class>
4113         <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">
4114                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
4115                         <field name="id" reporter:datatype="id" />
4116                         <field name="fq_field" reporter:datatype="text"/>
4117                         <field name="identity_value" reporter:datatype="text"/>
4118                         <field name="translation" reporter:datatype="text"/>
4119                         <field name="string" reporter:datatype="text"/>
4120                 </fields>
4121                 <links>
4122                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
4123                 </links>
4124         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4125             <actions>
4126                 <create permission="CREATE_TRANSLATION" global_required="true"/>
4127                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
4128                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
4129                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
4130             </actions>
4131         </permacrud>
4132         </class>
4133         <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">
4134                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
4135                         <field name="id" reporter:datatype="id" />
4136                         <field name="fm_class" reporter:datatype="text"/>
4137                         <field name="field" reporter:datatype="text"/>
4138                         <field name="owner" reporter:datatype="org_unit"/>
4139                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
4140                 </fields>
4141                 <links>
4142                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4143                 </links>
4144         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4145             <actions>
4146                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
4147                 <retrieve/>
4148                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
4149                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
4150             </actions>
4151         </permacrud>
4152         </class>
4153         <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">
4154                 <fields oils_persist:primary="code">
4155                         <field name="code" reporter:datatype="id" />
4156                         <field name="marc_code" reporter:datatype="text"/>
4157                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4158                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4159                 </fields>
4160                 <links/>
4161         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4162             <actions>
4163                 <create permission="CREATE_LOCALE" global_required="true"/>
4164                 <retrieve permission="CREATE_LOCALE UPDATE_LOCALE DELETE_LOCALE" global_required="true"/>
4165                 <update permission="UPDATE_LOCALE" global_required="true"/>
4166                 <delete permission="DELETE_LOCALE" global_required="true"/>
4167             </actions>
4168         </permacrud>
4169         </class>
4170         <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">
4171                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
4172                         <field name="id" reporter:datatype="id" reporter:label="ID" />
4173                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
4174                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
4175             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
4176                 </fields>
4177                 <links>
4178                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4179                 </links>
4180         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4181             <actions>
4182                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
4183                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
4184                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
4185                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
4186             </actions>
4187         </permacrud>
4188         </class>
4189         <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">
4190                 <fields oils_persist:primary="code">
4191                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
4192                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
4193                 </fields>
4194                 <links/>
4195         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4196             <actions>
4197                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4198                 <retrieve/>
4199                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4200                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4201             </actions>
4202         </permacrud>
4203         </class>
4204
4205         <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">
4206                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
4207                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
4208                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
4209                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
4210                         <field reporter:label="Ratio" name="ratio" />
4211                 </fields>
4212                 <links>
4213                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
4214                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
4215                 </links>
4216                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4217                         <actions>
4218                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4219                                 <retrieve/>
4220                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4221                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4222                         </actions>
4223                 </permacrud>
4224         </class>
4225
4226         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
4227                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
4228                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
4229                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
4230                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
4231                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
4232                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4233                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
4234                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
4235                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
4236                 </fields>
4237                 <links>
4238                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4239                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4240             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
4241                 </links>
4242         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4243             <actions>
4244                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
4245                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
4246                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
4247                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
4248             </actions>
4249         </permacrud>
4250         </class>
4251
4252         <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">
4253                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
4254                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
4255                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4256                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4257                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4258                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4259                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
4260                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
4261                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4262                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
4263                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
4264                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
4265                 </fields>
4266                 <links>
4267                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4268                 </links>
4269         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4270             <actions>
4271                 <create permission="ADMIN_PROVIDER">
4272                     <context link="provider" field="owner"/>
4273                 </create>
4274                 <retrieve permission="ADMIN_PROVIDER">
4275                     <context link="provider" field="owner"/>
4276                 </retrieve>
4277                 <update permission="ADMIN_PROVIDER">
4278                     <context link="provider" field="owner"/>
4279                 </update>
4280                 <delete permission="ADMIN_PROVIDER">
4281                     <context link="provider" field="owner"/>
4282                 </delete>
4283             </actions>
4284         </permacrud>
4285         </class>
4286
4287         <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">
4288                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
4289                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4290                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
4291                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4292                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
4293                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
4294                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
4295         </fields>
4296                 <links>
4297                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4298                 </links>
4299         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4300             <actions>
4301                 <create permission="ADMIN_PROVIDER">
4302                     <context link="provider" field="owner"/>
4303                 </create>
4304                 <retrieve permission="ADMIN_PROVIDER">
4305                     <context link="provider" field="owner"/>
4306                 </retrieve>
4307                 <update permission="ADMIN_PROVIDER">
4308                     <context link="provider" field="owner"/>
4309                 </update>
4310                 <delete permission="ADMIN_PROVIDER">
4311                     <context link="provider" field="owner"/>
4312                 </delete>
4313             </actions>
4314         </permacrud>
4315     </class>
4316         <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">
4317                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
4318                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
4319                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4320                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4321                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4322                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
4323                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4324                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4325                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4326                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4327                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
4328                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
4329                 </fields>
4330                 <links>
4331                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
4332                 </links>
4333         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4334             <actions>
4335                 <create permission="ADMIN_PROVIDER">
4336                     <context link="contact" jump='provider' field="owner"/>
4337                 </create>
4338                 <retrieve permission="ADMIN_PROVIDER">
4339                     <context link="contact" jump='provider' field="owner"/>
4340                 </retrieve>
4341                 <update permission="ADMIN_PROVIDER">
4342                     <context link="contact" jump='provider' field="owner"/>
4343                 </update>
4344                 <delete permission="ADMIN_PROVIDER">
4345                     <context link="contact" jump='provider' field="owner"/>
4346                 </delete>
4347             </actions>
4348         </permacrud>
4349         </class>
4350
4351         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
4352                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
4353                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='id'/>
4354                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
4355                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
4356                 </fields>
4357                 <links>
4358             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
4359                 </links>
4360                 <!--
4361                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
4362                         But here's what it should look like if we ever do use pcrud.
4363                 -->
4364                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4365                         <actions>
4366                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4367                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4368                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4369                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4370                         </actions>
4371                 </permacrud>
4372         </class>
4373
4374         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
4375                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
4376                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='id'/>
4377                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
4378                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
4379                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
4380                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
4381                 </fields>
4382                 <links>
4383                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
4384                 </links>
4385                 <!--
4386                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
4387                         But here's what it should look like if we ever do use pcrud.
4388                 -->
4389                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4390                         <actions>
4391                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4392                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4393                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4394                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4395                         </actions>
4396                 </permacrud>
4397         </class>
4398
4399         <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">
4400                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
4401                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
4402                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
4403                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
4404                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
4405                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4406                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
4407                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
4408                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
4409                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
4410                 </fields>
4411                 <links>
4412                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4413                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4414             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
4415             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
4416                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
4417                 </links>
4418         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4419             <actions>
4420                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
4421                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
4422                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
4423                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
4424             </actions>
4425         </permacrud>
4426         </class>
4427
4428         <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">
4429                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
4430                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
4431                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
4432                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4433                         <field reporter:label="Note" name="note" reporter:datatype="text" />
4434                 </fields>
4435                 <links>
4436                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4437                 </links>
4438         </class>
4439
4440         <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">
4441                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
4442                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
4443                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4444                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
4445                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
4446                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4447                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="text" />
4448                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
4449                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
4450                 </fields>
4451                 <links>
4452                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4453                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4454                 </links>
4455         </class>
4456
4457         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
4458                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
4459                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
4460                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
4461                         <field reporter:label="Name" name="name" reporter:datatype="text" />
4462                         <field reporter:label="Year" name="year" reporter:datatype="int" />
4463                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
4464                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4465                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
4466                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
4467                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
4468                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
4469                 </fields>
4470                 <links>
4471                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4472                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4473             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
4474             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
4475             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
4476                 </links>
4477         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4478             <actions>
4479                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
4480                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
4481                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
4482                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
4483             </actions>
4484         </permacrud>
4485         </class>
4486
4487         <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">
4488                 <fields oils_persist:primary="fund">
4489                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4490                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
4491                 </fields>
4492                 <links>
4493                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4494                 </links>
4495         </class>
4496
4497         <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">
4498                 <fields oils_persist:primary="fund">
4499                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4500                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
4501                 </fields>
4502                 <links>
4503                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4504                 </links>
4505         </class>
4506
4507         <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">
4508                 <fields oils_persist:primary="fund">
4509                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4510                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
4511                 </fields>
4512                 <links>
4513                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4514                 </links>
4515         </class>
4516
4517         <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">
4518                 <fields oils_persist:primary="fund">
4519                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4520                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
4521                 </fields>
4522                 <links>
4523                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4524                 </links>
4525         </class>
4526
4527         <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">
4528                 <fields oils_persist:primary="fund">
4529                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4530                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
4531                 </fields>
4532                 <links>
4533                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4534                 </links>
4535         </class>
4536
4537         <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">
4538                 <fields oils_persist:primary="funding_source">
4539                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
4540                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
4541                 </fields>
4542                 <links>
4543                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4544                 </links>
4545         </class>
4546
4547         <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">
4548                 <fields oils_persist:primary="funding_source">
4549                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
4550                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
4551                 </fields>
4552                 <links>
4553                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4554                 </links>
4555         </class>
4556
4557         <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">
4558                 <fields oils_persist:primary="funding_source">
4559                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
4560                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
4561                 </fields>
4562                 <links>
4563                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4564                 </links>
4565         </class>
4566
4567         <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">
4568                 <fields oils_persist:primary="fund">
4569                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4570                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
4571                 </fields>
4572                 <links>
4573                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4574                 </links>
4575         </class>
4576
4577         <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">
4578                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
4579                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
4580                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
4581                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
4582                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4583                         <field reporter:label="Percent" name="percent" reporter:datatype="float" />
4584                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
4585                         <field reporter:label="Note" name="note" reporter:datatype="text" />
4586                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
4587                 </fields>
4588                 <links>
4589                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
4590                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4591                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4592                 </links>
4593         </class>
4594
4595     <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">
4596         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
4597             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
4598             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
4599             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
4600             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
4601             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
4602             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
4603             <field reporter:label="Note" name="note" reporter:datatype="text" />
4604             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
4605         </fields>
4606         <links>
4607             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
4608             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4609             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4610         </links>
4611                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4612                         <actions>
4613                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
4614                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
4615                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
4616                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
4617                         </actions>
4618                 </permacrud>
4619     </class>
4620
4621         <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">
4622                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
4623                         <field reporter:label="Picklist ID" name="id" reporter:datatype="id" />
4624                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
4625                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link" />
4626                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
4627                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
4628                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
4629                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
4630                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
4631                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
4632                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
4633                 </fields>
4634                 <links>
4635                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4636                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4637                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4638                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4639                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
4640                 </links>
4641         </class>
4642
4643         <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">
4644                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
4645                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" />
4646                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
4647                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
4648                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
4649                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
4650                         <field reporter:label="State" name="state" reporter:datatype="text" />
4651                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
4652                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
4653                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
4654                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
4655                         <field reporter:label="Name" name="name" reporter:datatype="text" />
4656                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
4657                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="link" />
4658                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
4659                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
4660                 </fields>
4661                 <links>
4662                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4663                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4664                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4665                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
4666                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4667                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
4668                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
4669                 </links>
4670                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4671                         <actions>
4672                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
4673                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
4674                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
4675                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
4676                         </actions>
4677                 </permacrud>
4678         </class>
4679
4680         <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">
4681                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
4682                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
4683                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
4684                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
4685                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
4686                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
4687                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
4688                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
4689                 </fields>
4690                 <links>
4691                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4692                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4693                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
4694                 </links>
4695         </class>
4696
4697         <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">
4698                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
4699                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
4700                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
4701                         <field reporter:label="Picklist" name="picklist" reporter:datatype="link" />
4702                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
4703                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
4704                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
4705                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
4706                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
4707                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
4708                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
4709                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
4710                         <field reporter:label="State" name="state" reporter:datatype="text" />
4711                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
4712                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
4713                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
4714                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
4715                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
4716                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
4717                 </fields>
4718                 <links>
4719                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
4720                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4721                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4722                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4723                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
4724                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
4725                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
4726                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
4727                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
4728                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
4729                 </links>
4730         </class>
4731
4732         <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">
4733                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
4734                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
4735                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
4736                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
4737                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
4738                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
4739                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
4740                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
4741                 </fields>
4742                 <links>
4743                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4744                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4745                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
4746                 </links>
4747         </class>
4748
4749         <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">
4750                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
4751                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
4752                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
4753                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
4754                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
4755                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
4756                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
4757                 </fields>
4758                 <links>
4759                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
4760                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
4761                 </links>
4762         </class>
4763
4764         <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">
4765                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
4766                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
4767                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
4768                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
4769                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
4770                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
4771                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
4772                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
4773                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
4774                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
4775                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
4776                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
4777                         <field reporter:label="Note" name="note" reporter:datatype="text" />
4778                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
4779                 </fields>
4780                 <links>
4781                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
4782                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
4783                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4784                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
4785                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4786                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4787                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4788                 </links>
4789         </class>
4790
4791         <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">
4792                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
4793                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
4794                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4795                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
4796                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
4797                 </fields>
4798                 <links/>
4799         </class>
4800
4801         <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">
4802                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
4803                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
4804                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4805                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
4806                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
4807                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
4808                 </fields>
4809                 <links/>
4810         </class>
4811
4812         <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">
4813                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
4814                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
4815                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4816                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
4817                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
4818                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
4819                 </fields>
4820                 <links/>
4821         </class>
4822         <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">
4823                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
4824                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
4825                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4826                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
4827                         <field reporter:label="User" name="usr" reporter:datatype="link" />
4828                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
4829                 </fields>
4830                 <links>
4831                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4832                 </links>
4833         </class>
4834
4835         <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">
4836             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
4837                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
4838                 <field reporter:label="Code" name="code" reporter:datatype="text" />
4839                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
4840                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
4841                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
4842                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
4843         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
4844
4845             </fields>
4846             <links>
4847                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4848             </links>
4849             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4850                 <actions>
4851                     <create permission="ADMIN_PROVIDER">
4852                         <context link="provider" field="owner"/>
4853                     </create>
4854                     <retrieve permission="ADMIN_PROVIDER">
4855                         <context link="provider" field="owner"/>
4856                     </retrieve>
4857                     <update permission="ADMIN_PROVIDER">
4858                         <context link="provider" field="owner"/>
4859                     </update>
4860                     <delete permission="ADMIN_PROVIDER">
4861                         <context link="provider" field="owner"/>
4862                     </delete>
4863                 </actions>
4864             </permacrud>
4865         </class>
4866         
4867         <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">
4868             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
4869                 <field reporter:label="ID" name="id" reporter:datatype="id" />
4870                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
4871                 <field reporter:label="Name" name="name" reporter:datatype="text" />
4872                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
4873             </fields>
4874             <links>
4875                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4876             </links>
4877             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4878                 <actions>
4879                     <create permission="ADMIN_PROVIDER">
4880                         <context link="provider" field="owner"/>
4881                     </create>
4882                     <retrieve permission="ADMIN_PROVIDER">
4883                         <context link="provider" field="owner"/>
4884                     </retrieve>
4885                     <update permission="ADMIN_PROVIDER">
4886                         <context link="provider" field="owner"/>
4887                     </update>
4888                     <delete permission="ADMIN_PROVIDER">
4889                         <context link="provider" field="owner"/>
4890                     </delete>
4891                 </actions>
4892             </permacrud>
4893         </class>
4894         
4895         <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">
4896             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
4897                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
4898                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4899                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
4900                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
4901                 </fields>
4902                 <links/>
4903         </class>
4904
4905         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
4906                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
4907                         <field name="id" reporter:datatype="id" />
4908                         <field name="parent" reporter:datatype="link"/>
4909                         <field name="owner" reporter:datatype="link"/>
4910                         <field name="create_time" reporter:datatype="timestamp"/>
4911                         <field name="name" reporter:datatype="text"/>
4912                         <field name="shared" reporter:datatype="bool"/>
4913                         <field name="share_with" reporter:datatype="link"/>
4914                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4915                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
4916                 </fields>
4917                 <links>
4918                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4919                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
4920                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
4921                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
4922                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
4923                 </links>
4924         </class>
4925         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
4926                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
4927                         <field name="id" reporter:datatype="id" />
4928                         <field name="parent" reporter:datatype="link"/>
4929                         <field name="owner" reporter:datatype="link"/>
4930                         <field name="create_time" reporter:datatype="timestamp"/>
4931                         <field name="name" reporter:datatype="text"/>
4932                         <field name="shared" reporter:datatype="bool"/>
4933                         <field name="share_with" reporter:datatype="link"/>
4934                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4935                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
4936                 </fields>
4937                 <links>
4938                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4939                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
4940                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
4941                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
4942                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
4943                 </links>
4944         </class>
4945         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
4946                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
4947                         <field name="id" reporter:datatype="id" />
4948                         <field name="parent" reporter:datatype="link"/>
4949                         <field name="owner" reporter:datatype="link"/>
4950                         <field name="create_time" reporter:datatype="timestamp"/>
4951                         <field name="name" reporter:datatype="text"/>
4952                         <field name="shared" reporter:datatype="bool"/>
4953                         <field name="share_with" reporter:datatype="link"/>
4954                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4955                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
4956                 </fields>
4957                 <links>
4958                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4959                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
4960                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
4961                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
4962                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
4963                 </links>
4964         </class>
4965         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
4966                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
4967                         <field name="id" reporter:datatype="id" />
4968                         <field name="owner" reporter:datatype="link"/>
4969                         <field name="create_time" reporter:datatype="timestamp"/>
4970                         <field name="name" reporter:datatype="text"/>
4971                         <field name="data" reporter:datatype="text"/>
4972                         <field name="folder" reporter:datatype="link"/>
4973                         <field name="description" reporter:datatype="text"/>
4974                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
4975                 </fields>
4976                 <links>
4977                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4978                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
4979                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
4980                 </links>
4981         </class>
4982         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
4983                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
4984                         <field name="id" reporter:datatype="id" />
4985                         <field name="owner" reporter:datatype="link"/>
4986                         <field name="create_time" reporter:datatype="timestamp"/>
4987                         <field name="template" reporter:datatype="link"/>
4988                         <field name="data" reporter:datatype="link"/>
4989                         <field name="folder" reporter:datatype="link"/>
4990                         <field name="recur" reporter:datatype="bool"/>
4991                         <field name="recurrence" reporter:datatype="interval"/>
4992                         <field name="name" reporter:datatype="text"/>
4993                         <field name="description" reporter:datatype="text"/>
4994                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
4995                 </fields>
4996                 <links>
4997                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4998                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
4999                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
5000                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
5001                 </links>
5002         </class>
5003         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
5004                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
5005                         <field name="id" reporter:datatype="id" />
5006                         <field name="runner" reporter:datatype="link"/>
5007                         <field name="start_time" reporter:datatype="timestamp"/>
5008                         <field name="complete_time" reporter:datatype="timestamp"/>
5009                         <field name="run_time" reporter:datatype="timestamp"/>
5010                         <field name="email" reporter:datatype="text"/>
5011                         <field name="excel_format" reporter:datatype="bool"/>
5012                         <field name="csv_format" reporter:datatype="bool"/>
5013                         <field name="html_format" reporter:datatype="bool"/>
5014                         <field name="error_code" reporter:datatype="int"/>
5015                         <field name="error_text" reporter:datatype="text"/>
5016                         <field name="report" reporter:datatype="link"/>
5017                         <field name="folder" reporter:datatype="link"/>
5018                         <field name="chart_pie" reporter:datatype="bool"/>
5019                         <field name="chart_bar" reporter:datatype="bool"/>
5020                         <field name="chart_line" reporter:datatype="bool"/>
5021                 </fields>
5022                 <links>
5023                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
5024                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
5025                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
5026                 </links>
5027         </class>
5028         <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">
5029                 <fields oils_persist:primary="id">
5030                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5031                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
5032                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
5033                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
5034                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
5035                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
5036                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
5037                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
5038                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
5039                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
5040                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
5041                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
5042                 </fields>
5043                 <links>
5044                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
5045                 </links>
5046         </class>
5047         <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">
5048                 <fields oils_persist:primary="id">
5049                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5050                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
5051                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
5052                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
5053                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
5054                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
5055                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
5056                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
5057                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
5058                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
5059                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
5060                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
5061                 </fields>
5062                 <links>
5063                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
5064                 </links>
5065         </class>
5066         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
5067                 <fields oils_persist:primary="id">
5068                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5069                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
5070                         <field reporter:label="Fingerprint" name="fingerprint" />
5071                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
5072                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
5073                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
5074                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
5075                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
5076                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
5077                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
5078                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
5079                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
5080                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
5081                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
5082                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
5083                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
5084                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
5085                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
5086                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
5087                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
5088                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
5089                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
5090                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
5091                 </fields>
5092                 <links>
5093                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
5094                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
5095                 </links>
5096         </class>
5097         <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">
5098                 <fields oils_persist:primary="id">
5099                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
5100                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
5101                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
5102                 </fields>
5103                 <links>
5104                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
5105                 </links>
5106         </class>
5107         <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">
5108                 <fields oils_persist:primary="id">
5109                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
5110                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
5111                 </fields>
5112                 <links>
5113                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
5114                 </links>
5115         </class>
5116         <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">
5117                 <fields oils_persist:primary="id">
5118                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5119                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
5120                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
5121                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
5122                 </fields>
5123                 <links>
5124                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
5125                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
5126                 </links>
5127         </class>
5128         <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">
5129                 <fields oils_persist:primary="xact">
5130                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
5131                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
5132                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
5133                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
5134                 </fields>
5135                 <links>
5136                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
5137                 </links>
5138         </class>
5139         <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">
5140                 <fields oils_persist:primary="xact">
5141                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
5142                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
5143                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
5144                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
5145                 </fields>
5146                 <links>
5147                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
5148                 </links>
5149         </class>
5150         <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)">
5151                 <fields oils_persist:primary="id">
5152                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
5153                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
5154                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
5155                 </fields>
5156                 <links>
5157                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
5158                 </links>
5159         </class>
5160         <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">
5161                 <fields oils_persist:primary="id">
5162                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
5163                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
5164                 </fields>
5165                 <links>
5166                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
5167                 </links>
5168         </class>
5169         <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">
5170                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
5171                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
5172                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
5173                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
5174                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
5175                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5176                 </fields>
5177                 <links>
5178                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5179                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
5180                 </links>
5181                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5182                         <actions>
5183                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
5184                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
5185                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
5186                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
5187                         </actions>
5188                 </permacrud>
5189         </class>
5190         <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">
5191                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
5192                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
5193                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
5194                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
5195                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
5196                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5197                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
5198                 </fields>
5199                 <links>
5200                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
5201                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5202                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5203                 </links>
5204                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5205                         <actions>
5206                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
5207                                         <context link="formula" field="owner"/>
5208                                 </create>
5209                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
5210                                         <context link="formula" field="owner"/>
5211                                 </retrieve>
5212                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
5213                                         <context link="formula" field="owner"/>
5214                                 </update>
5215                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
5216                                         <context link="formula" field="owner"/>
5217                                 </delete>
5218                         </actions>
5219                 </permacrud>
5220         </class>
5221
5222     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
5223         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
5224             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
5225             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
5226             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
5227             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
5228             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5229             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
5230             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
5231             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
5232             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
5233             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
5234             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
5235             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
5236             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
5237             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
5238             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
5239         </fields>
5240     </class>
5241
5242     <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">
5243         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
5244             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
5245             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
5246             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
5247             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5248             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
5249         </fields>
5250     </class>
5251
5252     <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">
5253         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
5254             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
5255             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
5256             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
5257             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
5258             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
5259             <field reporter:label="City" name="city" reporter:datatype="text"/>
5260             <field reporter:label="State" name="state" reporter:datatype="text"/>
5261             <field reporter:label="Country" name="country" reporter:datatype="text"/>
5262             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
5263             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
5264         </fields>
5265     </class>
5266
5267     <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">
5268         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
5269             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
5270             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
5271             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
5272             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
5273             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
5274             <field reporter:label="City" name="city" reporter:datatype="text"/>
5275             <field reporter:label="State" name="state" reporter:datatype="text"/>
5276             <field reporter:label="Country" name="country" reporter:datatype="text"/>
5277             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
5278             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
5279         </fields>
5280     </class>
5281
5282     <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">
5283         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
5284             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
5285             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
5286             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
5287             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
5288             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
5289             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
5290         </fields>
5291     </class>
5292
5293     <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">
5294                 <oils_persist:source_definition>
5295
5296             SELECT  u.hold,
5297                     c.circ_lib,
5298                     count(*)
5299               FROM  action.unfulfilled_hold_list u
5300                     JOIN asset.copy c ON (c.id = u.current_copy)
5301               GROUP BY 1,2
5302
5303                 </oils_persist:source_definition>
5304         <fields>
5305             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5306             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
5307             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
5308         </fields>
5309                 <links>
5310                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5311                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5312                 </links>
5313     </class>
5314
5315     <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">
5316                 <oils_persist:source_definition>
5317
5318             SELECT  hold,
5319                     min(count)
5320               FROM  action.unfulfilled_hold_loops
5321               GROUP BY 1
5322
5323                 </oils_persist:source_definition>
5324         <fields>
5325             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5326             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
5327         </fields>
5328                 <links>
5329                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5330                 </links>
5331     </class>
5332
5333     <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">
5334                 <oils_persist:source_definition>
5335
5336             SELECT  DISTINCT l.*
5337               FROM  action.unfulfilled_hold_loops l
5338                     JOIN action.unfulfilled_hold_min_loop m USING (hold)
5339               WHERE l.count = m.min
5340
5341                 </oils_persist:source_definition>
5342         <fields>
5343             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5344             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
5345             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
5346         </fields>
5347                 <links>
5348                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5349                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5350                 </links>
5351     </class>
5352
5353     <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">
5354                 <oils_persist:source_definition>
5355
5356             SELECT  hold,
5357                     max(count)
5358               FROM  action.unfulfilled_hold_loops
5359               GROUP BY 1
5360
5361                 </oils_persist:source_definition>
5362         <fields>
5363             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5364             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
5365         </fields>
5366                 <links>
5367                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5368                 </links>
5369     </class>
5370
5371     <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">
5372                 <oils_persist:source_definition>
5373
5374             SELECT  DISTINCT l.*
5375               FROM  action.unfulfilled_hold_loops l
5376                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
5377               WHERE l.count = m.max
5378
5379                 </oils_persist:source_definition>
5380         <fields>
5381             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5382             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
5383             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
5384         </fields>
5385                 <links>
5386                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5387                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5388                 </links>
5389     </class>
5390
5391         <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">
5392                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
5393                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
5394                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
5395                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
5396                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
5397                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="int"/>
5398                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="int"/>
5399                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="int"/>
5400                 </fields>
5401                 <links>
5402                 </links>
5403                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5404                 </permacrud>
5405         </class>
5406
5407         <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">
5408                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
5409                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
5410                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
5411                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5412                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
5413                 </fields>
5414                 <links>
5415                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
5416                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
5417                 </links>
5418                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5419                 </permacrud>
5420         </class>
5421
5422         <class id="qdt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
5423                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
5424                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
5425                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
5426                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
5427                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
5428                 </fields>
5429                 <links>
5430                 </links>
5431                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5432                 </permacrud>
5433         </class>
5434
5435         <class id="qsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
5436                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
5437                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
5438                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
5439                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5440                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
5441                 </fields>
5442                 <links>
5443                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
5444                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
5445                 </links>
5446                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5447                 </permacrud>
5448         </class>
5449         
5450         <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">
5451                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
5452                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
5453                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
5454                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
5455                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
5456                 </fields>
5457                 <links>
5458                         <link field="return_type" reltype="might_have" key="id" map="" class="qdt"/>
5459                 </links>
5460                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5461                 </permacrud>
5462         </class>
5463         
5464         <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">
5465                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
5466                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
5467                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
5468                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5469                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
5470                 </fields>
5471                 <links>
5472                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
5473                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
5474                 </links>
5475                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5476                 </permacrud>
5477         </class>
5478
5479         <class id="qxp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
5480                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5481                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5482                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
5483                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5484                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5485                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5486                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
5487                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
5488                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
5489                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
5490                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
5491                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
5492                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
5493                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
5494                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
5495                 </fields>
5496                 <links>
5497                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5498                         <link field="left_operand" reltype="might_have" key="id" map="" class="qxp"/>
5499                         <link field="right_operand" reltype="might_have" key="id" map="" class="qxp"/>
5500                         <link field="function_id" reltype="might_have" key="id" map="" class="qfs"/>
5501                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
5502                         <link field="cast_type" reltype="might_have" key="id" map="" class="qdt"/>
5503                 </links>
5504                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5505                 </permacrud>
5506         </class>
5507
5508         <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">
5509                 <fields oils_persist:primary="id" oils_persist:sequence="case_branch_id_seq">
5510                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
5511                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5512                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5513                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
5514                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
5515                 </fields>
5516                 <links>
5517                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
5518                         <link field="condition" reltype="might_have" key="id" map="" class="qxp"/>
5519                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
5520                 </links>
5521                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5522                 </permacrud>
5523         </class>
5524
5525         <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">
5526                 <fields oils_persist:primary="id" oils_persist:sequence="from_relation_id_seq">
5527                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
5528                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
5529                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
5530                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
5531                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
5532                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
5533                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
5534                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
5535                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5536                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
5537                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
5538                 </fields>
5539                 <links>
5540                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
5541                         <link field="function_call" reltype="might_have" key="id" map="" class="qxp"/>
5542                         <link field="parent_relation" reltype="might_have" key="id" map="" class="qfr"/>
5543                         <link field="on_clause" reltype="might_have" key="id" map="" class="qxp"/>
5544                 </links>
5545                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5546                 </permacrud>
5547         </class>
5548
5549         <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">
5550                 <fields oils_persist:primary="id" oils_persist:sequence="record_column_id_seq">
5551                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
5552                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
5553                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5554                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
5555                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
5556                 </fields>
5557                 <links>
5558                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
5559                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
5560                 </links>
5561                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5562                 </permacrud>
5563         </class>
5564
5565         <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">
5566                 <fields oils_persist:primary="id" oils_persist:sequence="select_item_id_seq">
5567                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
5568                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
5569                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5570                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
5571                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
5572                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
5573                 </fields>
5574                 <links>
5575                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
5576                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
5577                 </links>
5578                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5579                 </permacrud>
5580         </class>
5581
5582         <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">
5583                 <fields oils_persist:primary="id" oils_persist:sequence="order_by_item_id_seq">
5584                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
5585                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
5586                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5587                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
5588                 </fields>
5589                 <links>
5590                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
5591                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
5592                 </links>
5593                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5594                 </permacrud>
5595         </class>
5596
5597         <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">
5598                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5599                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5600                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5601                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5602                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5603                 </fields>
5604                 <links>
5605                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5606                 </links>
5607                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5608                 </permacrud>
5609         </class>
5610
5611         <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">
5612                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5613                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5614                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5615                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5616                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5617                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
5618                 </fields>
5619                 <links>
5620                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5621                 </links>
5622                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5623                 </permacrud>
5624         </class>
5625
5626         <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">
5627                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5628                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5629                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5630                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5631                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5632                 </fields>
5633                 <links>
5634                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5635                 </links>
5636                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5637                 </permacrud>
5638         </class>
5639
5640         <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">
5641                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5642                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5643                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5644                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5645                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5646                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
5647                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
5648                 </fields>
5649                 <links>
5650                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5651                         <link field="left_operand" reltype="might_have" key="id" map="" class="qxp"/>
5652                         <link field="cast_type" reltype="might_have" key="id" map="" class="qdt"/>
5653                 </links>
5654                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5655                 </permacrud>
5656         </class>
5657
5658         <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">
5659                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5660                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5661                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5662                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5663                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5664                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
5665                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
5666                 </fields>
5667                 <links>
5668                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5669                 </links>
5670                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5671                 </permacrud>
5672         </class>
5673
5674         <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">
5675                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5676                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5677                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5678                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5679                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5680                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
5681                 </fields>
5682                 <links>
5683                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5684                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
5685                 </links>
5686                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5687                 </permacrud>
5688         </class>
5689
5690         <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">
5691                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5692                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5693                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5694                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5695                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5696                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
5697                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
5698                 </fields>
5699                 <links>
5700                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5701                         <link field="left_operand" reltype="might_have" key="id" map="" class="qxp"/>
5702                 </links>
5703                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5704                 </permacrud>
5705         </class>
5706
5707         <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">
5708                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5709                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5710                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5711                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5712                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5713                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
5714                 </fields>
5715                 <links>
5716                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5717                         <link field="function_id" reltype="might_have" key="id" map="" class="qfs"/>
5718                 </links>
5719                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5720                 </permacrud>
5721         </class>
5722
5723         <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">
5724                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5725                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5726                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5727                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5728                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5729                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
5730                 </fields>
5731                 <links>
5732                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5733                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
5734                 </links>
5735                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5736                 </permacrud>
5737         </class>
5738
5739         <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">
5740                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5741                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5742                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5743                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5744                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5745                 </fields>
5746                 <links>
5747                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5748                 </links>
5749                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5750                 </permacrud>
5751         </class>
5752
5753         <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">
5754                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5755                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5756                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5757                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5758                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5759                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
5760                 </fields>
5761                 <links>
5762                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5763                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
5764                 </links>
5765                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5766                 </permacrud>
5767         </class>
5768
5769         <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">
5770                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5771                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5772                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5773                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5774                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5775                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
5776                 </fields>
5777                 <links>
5778                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5779                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
5780                 </links>
5781                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5782                 </permacrud>
5783         </class>
5784
5785         <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">
5786                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5787                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5788                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5789                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5790                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5791                 </fields>
5792                 <links>
5793                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5794                 </links>
5795                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5796                 </permacrud>
5797         </class>
5798
5799         <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">
5800                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5801                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5802                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5803                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5804                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5805                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
5806                 </fields>
5807                 <links>
5808                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5809                 </links>
5810                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5811                 </permacrud>
5812         </class>
5813
5814         <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">
5815                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5816                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5817                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5818                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5819                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5820                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
5821                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
5822                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
5823                 </fields>
5824                 <links>
5825                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5826                         <link field="left_operand" reltype="might_have" key="id" map="" class="qxp"/>
5827                         <link field="right_operand" reltype="might_have" key="id" map="" class="qxp"/>
5828                 </links>
5829                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5830                 </permacrud>
5831         </class>
5832
5833         <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">
5834                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5835                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5836                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5837                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5838                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5839                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
5840                 </fields>
5841                 <links>
5842                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5843                 </links>
5844                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5845                 </permacrud>
5846         </class>
5847
5848         <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">
5849                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5850                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5851                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5852                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5853                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5854                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
5855                 </fields>
5856                 <links>
5857                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5858                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
5859                 </links>
5860                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5861                 </permacrud>
5862         </class>
5863
5864         <!-- ********************************************************************************************************************* -->
5865         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
5866         <!-- ********************************************************************************************************************* -->
5867         <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">
5868                 <fields oils_persist:primary="id">
5869                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
5870                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
5871                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
5872                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5873                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
5874                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
5875                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
5876                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
5877                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
5878                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
5879                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
5880                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
5881                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
5882                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
5883                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
5884                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
5885                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
5886                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
5887                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
5888                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
5889                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
5890                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
5891                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
5892                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
5893                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
5894                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
5895                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
5896                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
5897                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
5898                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
5899                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
5900                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
5901                 </fields>
5902                 <links>
5903                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
5904                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
5905                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
5906                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
5907                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5908                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
5909                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
5910                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
5911                 </links>
5912         </class>
5913
5914         <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">
5915                 <fields oils_persist:primary="id">
5916                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
5917                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5918                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
5919                 </fields>
5920                 <links>
5921                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5922                 </links>
5923         </class>
5924
5925         <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">
5926                 <fields oils_persist:primary="id">
5927                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
5928                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5929                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
5930                 </fields>
5931                 <links>
5932                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5933                 </links>
5934         </class>
5935
5936         <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">
5937                 <fields oils_persist:primary="id">
5938                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5939
5940                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
5941                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
5942                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
5943
5944                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
5945                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
5946                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
5947
5948                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
5949                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
5950
5951                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5952                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5953                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
5954
5955                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
5956                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
5957
5958                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
5959                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
5960                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
5961
5962                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
5963                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
5964                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
5965
5966                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
5967                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
5968                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
5969                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
5970
5971                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
5972                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
5973
5974                 </fields>
5975                 <links>
5976                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
5977                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5978                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
5979                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5980                 </links>
5981         </class>
5982
5983         <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">
5984                 <oils_persist:source_definition>
5985
5986                         SELECT  t.*
5987                           FROM  action.transit_copy t
5988                                 JOIN actor.org_unit AS s ON (t.source = s.id)
5989                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
5990                           WHERE s.parent_ou &lt;&gt; d.parent_ou
5991
5992                 </oils_persist:source_definition>
5993                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5994                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
5995                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
5996                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5997                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
5998                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
5999                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
6000                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
6001                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6002                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6003                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6004                 </fields>
6005                 <links>
6006                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
6007                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6008                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6009                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6010                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6011                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
6012                 </links>
6013         </class>
6014
6015     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
6016                 <oils_persist:source_definition>
6017
6018         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
6019                 SELECT
6020                         cp.id as copy,
6021                         COUNT(circ.id),
6022                         EXTRACT(YEAR FROM circ.xact_start) AS year,
6023                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
6024                 FROM
6025                         asset.copy cp
6026                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
6027                 GROUP BY 1, 3, 4
6028                 UNION
6029                 SELECT
6030                         cp.id as copy,
6031                         COUNT(circ.id),
6032                         EXTRACT(YEAR FROM circ.xact_start) AS year,
6033                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
6034                 FROM
6035                         asset.copy cp
6036                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
6037                 GROUP BY 1, 3, 4
6038                 UNION
6039                 SELECT
6040                         id as copy,
6041                         circ_count,
6042                         -1 AS year,
6043                         false as is_renewal
6044                 FROM
6045                         extend_reporter.legacy_circ_count
6046         )x GROUP BY 1, 3, 4
6047
6048                 </oils_persist:source_definition>
6049         <fields>
6050             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
6051             <field reporter:label="Count" name="count" reporter:datatype="int"/>
6052             <field reporter:label="Year" name="year" reporter:datatype="int"/>
6053             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
6054         </fields>
6055                 <links>
6056                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
6057                 </links>
6058                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6059                         <actions>
6060                                 <retrieve/>
6061                         </actions>
6062                 </permacrud>
6063     </class>
6064
6065         <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">
6066                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6067                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
6068                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
6069                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
6070                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6071                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
6072                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
6073                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
6074                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
6075                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
6076                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
6077                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
6078                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
6079                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
6080                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
6081                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
6082                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
6083                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
6084                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
6085                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
6086                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
6087                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
6088                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
6089                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
6090                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
6091                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6092                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6093                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6094                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
6095                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
6096                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
6097                 </fields>
6098                 <links>
6099                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6100                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
6101                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
6102                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6103                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
6104                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6105                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6106                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6107                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6108                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6109                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6110                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6111                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
6112                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6113                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6114                 </links>
6115         </class>
6116
6117     <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">
6118         <fields oils_persist:primary="id">
6119             <field reporter:label="Title" name="title" reporter:datatype="text"/>
6120             <field reporter:label="Author" name="author" reporter:datatype="text"/>
6121             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
6122             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6123             <field reporter:label="Price" name="price" reporter:datatype="money"/>
6124             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6125             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
6126             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
6127             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
6128             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
6129             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
6130             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
6131             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
6132             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
6133             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
6134             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
6135             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6136             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6137             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
6138             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
6139             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6140             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6141             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6142             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
6143             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6144             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
6145             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
6146             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
6147             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
6148             <field reporter:label="Status" name="status" reporter:datatype="link"/>
6149             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
6150             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
6151             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
6152             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
6153         </fields>
6154         <links>
6155             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6156             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6157             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6158             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6159             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6160         </links>
6161     </class>
6162
6163     <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">
6164         <fields oils_persist:primary="id">
6165             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
6166             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
6167             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
6168             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
6169         </fields>
6170         <links>
6171             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
6172             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6173         </links>
6174     </class>
6175
6176     <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">
6177         <fields oils_persist:primary="owning_lib">
6178             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
6179             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
6180             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
6181         </fields>
6182         <links>
6183             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6184         </links>
6185     </class>
6186
6187     <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">
6188         <fields oils_persist:primary="id">
6189             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
6190             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
6191             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
6192             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
6193             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
6194         </fields>
6195         <links>
6196             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
6197             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6198             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6199         </links>
6200     </class>
6201
6202     <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">
6203         <fields oils_persist:primary="circ_lib">
6204             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
6205             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
6206             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
6207             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
6208         </fields>
6209         <links>
6210             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6211             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6212         </links>
6213     </class>
6214
6215     <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">
6216         <fields oils_persist:primary="id">
6217             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
6218             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
6219             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
6220             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
6221             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
6222         </fields>
6223         <links>
6224             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
6225             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6226             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
6227         </links>
6228     </class>
6229
6230     <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">
6231         <fields oils_persist:primary="home_ou">
6232             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
6233             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
6234             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
6235             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
6236         </fields>
6237         <links>
6238             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6239             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
6240         </links>
6241     </class>
6242         <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">
6243                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
6244                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
6245                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
6246                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
6247                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6248                 </fields>
6249                 <links>
6250                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6251                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
6252                 </links>
6253                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6254                         <actions>
6255                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
6256                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
6257                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
6258                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
6259                         </actions>
6260                 </permacrud>
6261         </class>
6262         <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">
6263                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
6264                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
6265                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
6266                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
6267                 </fields>
6268                 <links>
6269                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6270                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
6271                         </links>
6272                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6273                 <actions>
6274                                 <create permission="ADMIN_ACQ_FUND_TAG">
6275                                         <context link="tag" field="owner"/>
6276                                 </create>
6277                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
6278                                         <context link="tag" field="owner"/>
6279                                 </retrieve>
6280                                 <update permission="ADMIN_ACQ_FUND_TAG">
6281                                         <context link="tag" field="owner"/>
6282                                 </update>
6283                                 <delete permission="ADMIN_ACQ_FUND_TAG">
6284                                         <context link="tag" field="owner"/>
6285                                 </delete>
6286                         </actions>
6287                 </permacrud>
6288         </class>
6289
6290         <!-- ********************************************************************************************************************* -->
6291
6292 </IDL>
6293
6294 <!--
6295     vim:noet:ts=4:sw=4:
6296 -->