]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
cbdd13b5a76ed5fbc026981e7e6e21be7864c3d6
[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           TEMPLATE
24 ############################
25
26     <class
27         id=""
28         controller="open-ils.cstore open-ils.pcrud"
29         oils_obj:fieldmapper=""
30         oils_persist:tablename=""
31         reporter:label=""
32         oils_persist:field_safe=""
33         oils_persist:virtual=""
34         oils_persist:readonly=""
35         reporter:core=""
36     >
37
38         <oils_persist:source_definition><![CDATA[
39             SELECT * FROM foo
40         ]]></oils_persist:source_definition>
41
42         <fields oils_persist:primary="" oils_persist:sequence="">
43             <field reporter:label="ID" name="id" reporter:datatype="id"/>
44                         <field reporter:label="" name="" reporter:datatype="org_unit"/>
45             <field reporter:label="" name="" reporter:datatype="text"/>
46             <field reporter:label="" name="" reporter:datatype="link"/>
47             <field reporter:label="" name="" reporter:datatype="timestamp"/>
48             <field reporter:label="" name="" reporter:datatype="money"/>
49             <field reporter:label="" name="" reporter:datatype="bool"/>
50             <field reporter:label="" name="" reporter:datatype="int" oils_obj:required="true"/>
51             <field reporter:label="" name="" reporter:datatype="int" oils_persist:virtual="true"/>
52         </fields>
53
54         <links>
55             <link field="" reltype="has_a" key="" map="" class=""/>
56         </links>
57
58         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
59             <actions>
60                 <create permission="" gloabl_required="true"/>
61                 <retrieve/>
62                 <update permission="" context_field=""/>
63                 <delete permission="">
64                     <context link="" field=""/>
65                 </delete>
66             </actions>
67         </permacrud>
68
69     </class>
70
71
72 -->
73
74 <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">
75
76         <!-- Virtual classes -->
77         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
78                 <fields>
79                         <field name="usr" oils_persist:virtual="true" />
80                         <field name="forgive_payment" oils_persist:virtual="true" />
81                         <field name="work_payment" oils_persist:virtual="true" />
82                         <field name="credit_payment" oils_persist:virtual="true" />
83                         <field name="goods_payment" oils_persist:virtual="true" />
84                 </fields>
85                 <links>
86                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
87                 </links>
88         </class>
89
90         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
91                 <fields>
92                         <field name="workstation" oils_persist:virtual="true" />
93                         <field name="cash_payment" oils_persist:virtual="true" />
94                         <field name="check_payment" oils_persist:virtual="true" />
95                         <field name="credit_card_payment" oils_persist:virtual="true" />
96                 </fields>
97                 <links>
98                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
99                 </links>
100         </class>
101
102         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
103                 <fields>
104                         <field name="id" oils_persist:virtual="true" />
105                         <field name="children" oils_persist:virtual="true" />
106                         <field name="owner_doc" oils_persist:virtual="true" />
107                         <field name="intra_doc_id" oils_persist:virtual="true" />
108                         <field name="parent_node" oils_persist:virtual="true" />
109                         <field name="node_type" oils_persist:virtual="true" />
110                         <field name="namespace_uri" oils_persist:virtual="true" />
111                         <field name="name" oils_persist:virtual="true" />
112                         <field name="value" oils_persist:virtual="true" />
113                 </fields>
114         </class>
115
116         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
117                 <fields>
118                         <field name="title" oils_persist:virtual="true" />
119                         <field name="author" oils_persist:virtual="true" />
120                         <field name="doc_id" oils_persist:virtual="true" />
121                         <field name="doc_type" oils_persist:virtual="true" />
122                         <field name="pubdate" oils_persist:virtual="true" />
123                         <field name="isbn" oils_persist:virtual="true" />
124                         <field name="publisher" oils_persist:virtual="true" />
125                         <field name="tcn" oils_persist:virtual="true" />
126                         <field name="subject" oils_persist:virtual="true" />
127                         <field name="types_of_resource" oils_persist:virtual="true" />
128                         <field name="call_numbers" oils_persist:virtual="true" />
129                         <field name="edition" oils_persist:virtual="true" />
130                         <field name="online_loc" oils_persist:virtual="true" />
131                         <field name="synopsis" oils_persist:virtual="true" />
132                         <field name="physical_description" oils_persist:virtual="true" />
133                         <field name="toc" oils_persist:virtual="true" />
134                         <field name="copy_count" oils_persist:virtual="true" />
135                         <field name="series" oils_persist:virtual="true" />
136                         <field name="serials" oils_persist:virtual="true" />
137                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
138                 </fields>
139         </class>
140
141         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
142                 <fields>
143                         <field name="err_msg" oils_persist:virtual="true" />
144                         <field name="type" oils_persist:virtual="true" />
145                 </fields>
146         </class>
147
148         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
149                 <fields>
150                         <field name="err_msg" oils_persist:virtual="true" />
151                         <field name="type" oils_persist:virtual="true" />
152                 </fields>
153         </class>
154
155         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
156                 <fields oils_persist:primary="matchpoint">
157                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
158                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
159                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
160                 </fields>
161                 <links>
162                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
163                 </links>
164         </class>
165
166         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
167         <!-- when the time is right, turn me into a view.  -->
168                 <fields>
169             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
170             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
171             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
172             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
173             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
174             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
175             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
176             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
177             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
178             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
179                 </fields>
180         </class>
181
182         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
183                 <fields>
184                         <field name="public_name" oils_persist:virtual="true" />
185                         <field name="target_url" oils_persist:virtual="true" />
186                         <field name="target_coverage" oils_persist:virtual="true" />
187                         <field name="target_embargo" oils_persist:virtual="true" />
188                 </fields>
189         </class>
190
191         <!-- Actually in the DB -->
192         <class id="vmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::merge_profile" oils_persist:tablename="vandelay.merge_profile" reporter:label="Bib Import Merge Profile">
193                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
194                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
195                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
196                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
197                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
198                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
199                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
200                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
201                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
202                 </fields>
203                 <links>
204                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
205                 </links>
206                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
207                         <actions>
208                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
209                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
210                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
211                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
212                         </actions>
213                 </permacrud>
214         </class>
215
216         <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">
217                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
218                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
219                         <field reporter:label="Group" name="grp" reporter:datatype="link"/>
220                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
221                 </fields>
222                 <links>
223                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
224                 </links>
225                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
226                         <actions>
227                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
228                     <context link="grp" field="owner"/>
229                 </create>
230                                 <retrieve/>
231                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
232                     <context link="grp" field="owner"/>
233                 </update>
234                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
235                     <context link="grp" field="owner"/>
236                 </delete>
237                         </actions>
238                 </permacrud>
239         </class>
240
241         <class  id="vibtg" 
242             controller="open-ils.cstore open-ils.pcrud" 
243             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
244             oils_persist:tablename="vandelay.import_bib_trash_group" 
245             reporter:label="Import/Overlay Field Groups for Removal">
246                 <fields oils_persist:primary="id" 
247                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
248                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
249                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
250                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
251                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
252                 </fields>
253                 <links>
254                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
255                 </links>
256                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
257                         <actions>
258                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
259                                 <retrieve/>
260                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
261                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
262                         </actions>
263                 </permacrud>
264         </class>
265
266
267         <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">
268                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
269                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
270                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
271                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
272                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
273                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
274                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
275                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
276                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
277                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
278                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
279                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
280                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
281                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
282                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
283                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
284                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
285                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
286                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
287                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
288                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
289                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
290                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
291                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
292                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
293                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
294                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
295                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
296                 </fields>
297                 <links>
298                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
299                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
300                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
301                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
302                 </links>
303                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
304                         <actions>
305                                 <create permission="CREATE_IMPORT_ITEM">
306                     <context link="definition" field="owner"/>
307                                 </create>
308                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
309                     <context link="definition" field="owner"/>
310                                 </retrieve>
311                                 <update permission="UPDATE_IMPORT_ITEM">
312                     <context link="definition" field="owner"/>
313                                 </update>
314                                 <delete permission="DELETE_IMPORT_ITEM">
315                     <context link="definition" field="owner"/>
316                                 </delete>
317                         </actions>
318                 </permacrud>
319         </class>
320
321         <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">
322                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
323                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
324                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
325                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
326                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
327                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
328                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
329                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
330                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
331                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
332                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
333                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
334                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
335                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
336                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
337                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
338                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
339                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
340                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
341                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
342                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
343                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
344                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
345                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
346                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
347                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
348                 </fields>
349                 <links>
350                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
351                 </links>
352                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
353                         <actions>
354                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
355                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
356                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
357                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
358                         </actions>
359                 </permacrud>
360         </class>
361
362         <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">
363                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
364                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
365                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
366                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
367                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
368                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
369                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
370                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
371                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
372                 </fields>
373                 <links>
374                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
375                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
376                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
377                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
378                 </links>
379                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
380                         <actions>
381                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
382                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
383                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
384                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
385                         </actions>
386                 </permacrud>
387         </class>
388
389         <class id="vie" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_error" oils_persist:tablename="vandelay.import_error" reporter:label="Import/Overlay Error Definitions">
390                 <fields oils_persist:primary="code">
391                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
392                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
393                 </fields>
394                 <links>
395                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
396                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
397                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
398                 </links>
399                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
400                         <actions>
401                                 <retrieve/>
402                         </actions>
403                 </permacrud>
404         </class>
405
406         <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">
407                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
408                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
409                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
410                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
411                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
412                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
413                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
414                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
415                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
416                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
417                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
418                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
419                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
420                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
421                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
422                 </fields>
423                 <links>
424                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
425                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
426                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
427                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
428             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
429             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
430             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
431                 </links>
432                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
433                         <actions>
434                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
435                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
436                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
437                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
438                         </actions>
439                 </permacrud>
440         </class>
441
442         <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">
443                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
444                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
445                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
446                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
447                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
448                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
449                 </fields>
450                 <links/>
451                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
452                         <actions>
453                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
454                 <retrieve/>
455                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
456                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
457                         </actions>
458                 </permacrud>
459         </class>
460
461         <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">
462                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
463                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
464                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
465                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
466                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
467                 </fields>
468                 <links>
469                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
470                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
471                 </links>
472                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
473                         <actions>
474                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
475                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
476                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
477                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
478                         </actions>
479                 </permacrud>
480         </class>
481
482         <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">
483                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
484                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
485                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
486                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
487                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
488                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
489                 </fields>
490                 <links>
491                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
492                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
493                 </links>
494                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
495                         <actions>
496                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
497                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
498                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
499                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
500                         </actions>
501                 </permacrud>
502         </class>
503
504         <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">
505                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
506                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
507                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
508                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
509                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
510                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
511                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
512                 </fields>
513                 <links>
514                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
515                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
516                 </links>
517                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
518                         <actions>
519                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
520                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
521                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
522                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
523                         </actions>
524                 </permacrud>
525         </class>
526
527         <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">
528                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
529                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
530                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
531                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
532                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
533                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
534                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
535                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
536                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
537                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
538                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
539                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
540                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
541                 </fields>
542                 <links>
543                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
544                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
545                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
546             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
547             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
548                 </links>
549                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
550                         <actions>
551                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
552                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
553                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
554                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
555                         </actions>
556                 </permacrud>
557         </class>
558
559         <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">
560                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
561                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
562                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
563                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
564                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
565                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
566                 </fields>
567                 <links/>
568                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
569                         <actions>
570                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
571                 <retrieve/>
572                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
573                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
574                         </actions>
575                 </permacrud>
576         </class>
577
578         <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">
579                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
580                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
581                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
582                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
583                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
584                 </fields>
585                 <links>
586                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
587                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
588                 </links>
589                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
590                         <actions>
591                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
592                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
593                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
594                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
595                         </actions>
596                 </permacrud>
597         </class>
598
599         <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">
600                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
601                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
602                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
603                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
604                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
605                 </fields>
606                 <links>
607                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
608                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
609                 </links>
610                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
611                         <actions>
612                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
613                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
614                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
615                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
616                         </actions>
617                 </permacrud>
618         </class>
619
620         <class id="vms" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set" oils_persist:tablename="vandelay.match_set" reporter:label="Record Matching Definition Set">
621                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
622                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
623                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
624                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
625                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
626                 </fields>
627                 <links>
628                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
629                 </links>
630                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
631                         <actions>
632                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
633                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
634                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
635                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
636                         </actions>
637                 </permacrud>
638         </class>
639
640         <class id="vmsp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_point" oils_persist:tablename="vandelay.match_set_point" reporter:label="Record Matching Definition">
641                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
642                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
643                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
644                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
645                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
646                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
647                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
648                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
649             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
650                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
651                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
652                 </fields>
653                 <links>
654                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
655                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
656                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
657                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
658                 </links>
659                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
660                         <actions>
661                                 <create permission="ADMIN_IMPORT_MATCH_SET">
662                     <context link="match_set" field="owner"/>
663                                 </create>
664                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
665                     <context link="match_set" field="owner"/>
666                                 </retrieve>
667                                 <update permission="ADMIN_IMPORT_MATCH_SET">
668                     <context link="match_set" field="owner"/>
669                                 </update>
670                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
671                     <context link="match_set" field="owner"/>
672                                 </delete>
673                         </actions>
674                 </permacrud>
675         </class>
676
677         <class id="vmsq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_quality" oils_persist:tablename="vandelay.match_set_quality" reporter:label="Record Quality Metric">
678                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
679                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
680                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
681                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
682                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
683                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
684                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
685                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
686                 </fields>
687                 <links>
688                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
689                 </links>
690                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
691                         <actions>
692                                 <create permission="ADMIN_IMPORT_MATCH_SET">
693                     <context link="match_set" field="owner"/>
694                                 </create>
695                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
696                     <context link="match_set" field="owner"/>
697                                 </retrieve>
698                                 <update permission="ADMIN_IMPORT_MATCH_SET">
699                     <context link="match_set" field="owner"/>
700                                 </update>
701                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
702                     <context link="match_set" field="owner"/>
703                                 </delete>
704                         </actions>
705                 </permacrud>
706         </class>
707
708         <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">
709                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
710                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
711                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
712                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
713                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
714                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
715                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
716                 </fields>
717                 <links>
718                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
719                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
720                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
721                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
722                 </links>
723         </class>
724
725     <class id="cgf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::global_flag" oils_persist:tablename="config.global_flag" reporter:label="Global Flags and Settings" oils_persist:field_safe="true">
726         <fields oils_persist:primary="name">
727             <field reporter:label="Name" name="name" reporter:datatype="text"/>
728             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
729             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
730             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
731         </fields>
732         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
733             <actions>
734                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
735                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
736                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
737                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
738             </actions>
739         </permacrud>
740     </class>
741
742     <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">
743         <fields oils_persist:primary="id">
744             <field reporter:label="ID" name="id" reporter:datatype="id"/>
745             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
746             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
747             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
748             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
749         </fields>
750         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
751             <actions>
752                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
753                 <retrieve/>
754                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
755                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
756             </actions>
757         </permacrud>
758     </class>
759
760         <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">
761                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
762                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
763                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
764                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
765                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
766                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
767                 </fields>
768                 <links>
769                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
770                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
771                 </links>
772         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
773             <actions>
774                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
775                 <retrieve/>
776                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
777                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
778             </actions>
779         </permacrud>
780         </class>
781
782         <class id="crad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_definition" oils_persist:tablename="config.record_attr_definition" reporter:label="SVF Record Attribute Defintion" oils_persist:field_safe="true">
783                 <fields oils_persist:primary="name">
784                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
785                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
786                         <field reporter:label="Description" name="description" reporter:datatype="text" />
787                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
788                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
789                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
790                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
791                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
792                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
793                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
794                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
795                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
796                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
797                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
798                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
799                 </fields>
800                 <links>
801                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
802                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
803                 </links>
804         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
805             <actions>
806                 <create permission="ADMIN_SVF" global_required="true"/>
807                 <retrieve/>
808                 <update permission="ADMIN_SVF" global_required="true"/>
809                 <delete permission="ADMIN_SVF" global_required="true"/>
810             </actions>
811         </permacrud>
812         </class>
813
814         <class id="csc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::sms_carrier" oils_persist:tablename="config.sms_carrier" reporter:label="SMS Carrier" oils_persist:field_safe="true">
815                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
816                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
817                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
818                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
819             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
820                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
821                 </fields>
822                 <links/>
823         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
824             <actions>
825                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
826                 <retrieve/>
827                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
828                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
829             </actions>
830         </permacrud>
831         </class>
832
833         <class id="mra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr" oils_persist:tablename="metabib.record_attr" reporter:label="SVF Record Attribute" oils_persist:field_safe="true">
834                 <fields oils_persist:primary="id">
835                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
836                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
837                 </fields>
838                 <links>
839                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
840                 </links>
841         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
842             <actions>
843                 <retrieve/>
844             </actions>
845         </permacrud>
846         </class>
847
848         <class id="crainm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_index_norm_map" oils_persist:tablename="config.record_attr_index_norm_map" reporter:label="SVF Record Attribute to Indexing Normalizer Map" oils_persist:field_safe="true">
849                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
850                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
851                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
852                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
853                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
854                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
855                 </fields>
856                 <links>
857                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
858                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
859                 </links>
860         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
861             <actions>
862                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
863                 <retrieve/>
864                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
865                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
866             </actions>
867         </permacrud>
868         </class>
869
870         <class id="ccvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::coded_value_map" oils_persist:tablename="config.coded_value_map" reporter:label="SVF Record Attribute Coded Value Map" oils_persist:field_safe="true">
871                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
872                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true"/>
873                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
874                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
875                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
876                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
877                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
878                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
879             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
880                 </fields>
881                 <links>
882                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
883                 </links>
884         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
885             <actions>
886                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
887                 <retrieve/>
888                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
889                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
890             </actions>
891         </permacrud>
892         </class>
893
894         <class id="cracct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::remote_account" oils_persist:tablename="config.remote_account" reporter:label="Remote (3rd party) Account">
895                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
896                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
897                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
898                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
899                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
900                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
901                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
902                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
903                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
904                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
905                 </fields>
906                 <links>
907                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
908                 </links>
909         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
910             <actions>
911                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
912                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
913                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
914                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
915             </actions>
916         </permacrud>
917         </class>
918
919     <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">
920         <fields oils_persist:primary="name">
921             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
922             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
923             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
924             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
925             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
926             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
927             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
928             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
929             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
930             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
931         </fields>
932         <links>
933             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
934             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
935         </links>
936         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
937             <actions>
938                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
939                 <retrieve/>
940                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
941                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
942             </actions>
943         </permacrud>
944     </class>
945
946     <class id="cza" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
947         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
948             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
949             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
950             <field reporter:label="Name" name="name" reporter:datatype="text"/>
951             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
952             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
953             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
954             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
955         </fields>
956         <links>
957             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
958         </links>
959         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
960             <actions>
961                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
962                 <retrieve/>
963                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
964                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
965             </actions>
966         </permacrud>
967     </class>
968
969     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
970                         oils_obj:fieldmapper="config::z3950_index_field_map" 
971                         oils_persist:tablename="config.z3950_index_field_map" 
972                         reporter:label="Z39.50 Index Field Map">
973         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
974             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
975             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
976             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
977             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
978             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
979             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
980         </fields>
981         <links>
982             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
983             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
984             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
985         </links>
986         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
987             <actions>
988                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
989                 <retrieve/>
990                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
991                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
992             </actions>
993         </permacrud>
994     </class>
995
996
997         <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">
998                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
999                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1000                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1001                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1002                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1003                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1004                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1005                 </fields>
1006                 <links>
1007             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1008             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1009                 </links>
1010                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1011                         <actions>
1012                                 <retrieve/>
1013                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1014                         </actions>
1015                 </permacrud>
1016         </class>
1017
1018         <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">
1019                 <fields oils_persist:primary="key">
1020                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
1021                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1022                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1023                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1024                 </fields>
1025                 <links/>
1026                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1027                         <actions>
1028                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1029                                 <retrieve/>
1030                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1031                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1032                         </actions>
1033                 </permacrud>
1034         </class>
1035
1036         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1037                 <fields oils_persist:primary="module">
1038                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1039                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1040                 </fields>
1041                 <links/>
1042         </class>
1043
1044         <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">
1045                 <fields oils_persist:primary="module">
1046                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1047                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1048                 </fields>
1049                 <links/>
1050                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1051                         <actions>
1052                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1053                                 <retrieve/>
1054                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1055                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1056                         </actions>
1057                 </permacrud>
1058         </class>
1059
1060         <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">
1061                 <fields oils_persist:primary="module">
1062                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1063                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1064                 </fields>
1065                 <links/>
1066                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1067                         <actions>
1068                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1069                                 <retrieve/>
1070                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1071                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1072                         </actions>
1073                 </permacrud>
1074         </class>
1075
1076         <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">
1077                 <fields oils_persist:primary="module">
1078                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1079                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1080                 </fields>
1081                 <links/>
1082                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1083                         <actions>
1084                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1085                                 <retrieve/>
1086                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1087                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1088                         </actions>
1089                 </permacrud>
1090         </class>
1091
1092         <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">
1093                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1094                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1095                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1096                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1097                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1098                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1099                 </fields>
1100                 <links>
1101                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1102                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1103                 </links>
1104                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1105                         <actions>
1106                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1107                     <context link="event_def" field="owner"/>
1108                 </create>
1109                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1110                     <context link="event_def" field="owner"/>
1111                 </retrieve>
1112                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1113                     <context link="event_def" field="owner"/>
1114                 </update>
1115                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1116                     <context link="event_def" field="owner"/>
1117                 </delete>
1118                         </actions>
1119                 </permacrud>
1120         </class>
1121
1122         <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">
1123                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1124                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1125                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1126                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1127                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1128                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1129                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1130                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1131                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1132                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1133                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1134                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1135                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1136                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1137                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1138                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1139                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1140                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1141                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1142                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1143                 </fields>
1144                 <links>
1145                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1146                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1147                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1148                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1149                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1150                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1151                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1152                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1153                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1154                 </links>
1155                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1156                         <actions>
1157                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1158                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1159                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1160                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1161                         </actions>
1162                 </permacrud>
1163         </class>
1164
1165         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1166                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1167                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1168                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1169                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1170                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1171                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1172                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1173                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1174                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1175                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1176                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1177                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1178                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1179                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1180                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1181                 </fields>
1182                 <links>
1183                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1184                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1185                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1186                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1187                 </links>
1188         </class>
1189
1190         <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">
1191                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1192                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1193                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1194                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1195                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1196                 </fields>
1197                 <links>
1198                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1199                 </links>
1200                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1201                         <actions>
1202                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1203                     <context link="event_def" field="owner"/>
1204                 </create>
1205                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1206                     <context link="event_def" field="owner"/>
1207                 </retrieve>
1208                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1209                     <context link="event_def" field="owner"/>
1210                 </update>
1211                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1212                     <context link="event_def" field="owner"/>
1213                 </delete>
1214                         </actions>
1215                 </permacrud>
1216         </class>
1217
1218         <class id="atul" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::user_log" reporter:label="Action Trigger User Log" oils_persist:readonly="true">
1219                 <oils_persist:source_definition><![CDATA[
1220                 SELECT  atevdef.hook,
1221                         atevdef.name,
1222                         atevdef.reactor,
1223                         atev.id,
1224                         atev.event_def,
1225                         atev.add_time,
1226                         atev.run_time,
1227                         atev.start_time,
1228                         atev.update_time,
1229                         atev.complete_time,
1230                         atev.update_process,
1231                         atev.state,
1232                         atev.user_data,
1233                         atev.template_output,
1234                         atev.error_output,
1235                         atev.async_output,
1236                         targ_circ.id AS target_circ,
1237                         targ_ahr.id AS target_hold,
1238                         COALESCE(
1239                                 targ_circ.circ_lib,
1240                                 targ_ahr.pickup_lib
1241                         ) AS perm_lib
1242                 FROM action_trigger.event atev
1243                 JOIN action_trigger.event_definition atevdef ON
1244                         (atevdef.id = atev.event_def)
1245                 JOIN action_trigger.hook ath ON
1246                         (ath.key = atevdef.hook)
1247                 LEFT JOIN action.circulation targ_circ ON
1248                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1249                 LEFT JOIN action.hold_request targ_ahr ON
1250                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1251                 WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
1252                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1253                                 'circ.staff.max_visible_event_age',
1254                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1255                         ) UNION
1256                         SELECT '1000 YEARS'::INTERVAL AS value
1257                 ) ous)
1258                 ]]></oils_persist:source_definition>
1259                 <fields oils_persist:primary="id">
1260                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1261                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1262                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1263                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1264                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1265                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1266                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1267                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1268                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1269                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1270                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1271                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1272                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1273                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1274                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1275                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1276                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1277                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1278                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1279                 </fields>
1280                 <links>
1281                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1282                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1283                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1284                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1285                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1286                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1287                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1288                 </links>
1289                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1290                         <actions>
1291                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1292                         </actions>
1293                 </permacrud>
1294         </class>
1295
1296         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1297                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1298                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1299                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1300                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1301                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1302                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1303                 </fields>
1304                 <links>
1305                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1306                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1307                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1308                 </links>
1309         </class>
1310
1311         <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">
1312                 <fields oils_persist:primary="code">
1313                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1314                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1315                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1316                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1317                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1318                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1319                 </fields>
1320                 <links/>
1321         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1322             <actions>
1323                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1324                 <retrieve/>
1325                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1326                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1327             </actions>
1328         </permacrud>
1329         </class>
1330
1331         <class id="aiit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_item_type" oils_persist:tablename="acq.invoice_item_type" reporter:label="Non-bibliographic Invoice Item Type" oils_persist:field_safe="true">
1332                 <fields oils_persist:primary="code">
1333                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1334                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1335                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1336                 </fields>
1337                 <links/>
1338         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1339             <actions>
1340                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1341                 <retrieve/>
1342                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1343                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1344             </actions>
1345         </permacrud>
1346         </class>
1347
1348         <class id="acqim" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_method" oils_persist:tablename="acq.invoice_method" reporter:label="Invoice Method used by Vendor" oils_persist:field_safe="true">
1349                 <fields oils_persist:primary="code">
1350                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1351                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1352                 </fields>
1353                 <links/>
1354         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1355             <actions>
1356                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1357                 <retrieve/>
1358                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1359                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1360             </actions>
1361         </permacrud>
1362         </class>
1363
1364         <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">
1365                 <fields oils_persist:primary="code">
1366                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1367                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1368                 </fields>
1369                 <links/>
1370         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1371             <actions>
1372                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1373                 <retrieve/>
1374                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1375                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1376             </actions>
1377         </permacrud>
1378         </class>
1379
1380         <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">
1381                 <fields oils_persist:primary="code">
1382                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1383                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1384                 </fields>
1385                 <links/>
1386         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1387             <actions>
1388                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1389                 <retrieve/>
1390                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1391                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1392             </actions>
1393         </permacrud>
1394         </class>
1395
1396         <class id="bpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_type" oils_persist:tablename="biblio.peer_type" reporter:label="Bibliographic Record Peer Type" oils_persist:field_safe="true">
1397                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1398                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1399                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1400                 </fields>
1401                 <links/>
1402         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1403             <actions>
1404                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1405                 <retrieve/>
1406                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1407                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1408             </actions>
1409         </permacrud>
1410         </class>
1411
1412         <class id="bpbcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_bib_copy_map" oils_persist:tablename="biblio.peer_bib_copy_map" reporter:label="Bibliographic Record Peer Copy Map">
1413                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1414                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1415                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1416                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1417                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1418                 </fields>
1419         <links>
1420             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1421             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1422             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1423         </links>
1424         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1425             <actions>
1426                 <create permission="UPDATE_COPY">
1427                     <context link="target_copy" field="circ_lib"/>
1428                 </create>
1429                 <retrieve/>
1430                 <update permission="UPDATE_COPY">
1431                     <context link="target_copy" field="circ_lib"/>
1432                 </update>
1433                 <delete permission="UPDATE_COPY">
1434                     <context link="target_copy" field="circ_lib"/>
1435                 </delete>
1436             </actions>
1437         </permacrud>
1438         </class>
1439
1440         <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">
1441                 <fields oils_persist:primary="code">
1442                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1443                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1444                 </fields>
1445                 <links/>
1446         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1447             <actions>
1448                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1449                 <retrieve/>
1450                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1451                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1452             </actions>
1453         </permacrud>
1454         </class>
1455
1456         <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">
1457                 <fields oils_persist:primary="code">
1458                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1459                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1460                 </fields>
1461                 <links/>
1462         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1463             <actions>
1464                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1465                 <retrieve/>
1466                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1467                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1468             </actions>
1469         </permacrud>
1470         </class>
1471
1472         <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">
1473                 <fields oils_persist:primary="code">
1474                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1475                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1476                 </fields>
1477                 <links/>
1478         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1479             <actions>
1480                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1481                 <retrieve/>
1482                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1483                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1484             </actions>
1485         </permacrud>
1486         </class>
1487
1488     <class id="chmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_weights" oils_persist:tablename="config.hold_matrix_weights" reporter:label="Hold Matrix Weights">
1489         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1490             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1491             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1492             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1493             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1494             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1495             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1496             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1497             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1498             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1499             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1500             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1501             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1502             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1503             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1504             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1505             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1506             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1507         </fields>
1508         <links/>
1509         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1510             <actions>
1511                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1512                 <retrieve/>
1513                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1514                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1515             </actions>
1516         </permacrud>
1517     </class>
1518
1519     <class id="ccmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_weights" oils_persist:tablename="config.circ_matrix_weights" reporter:label="Circ Matrix Weights">
1520         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1521             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1522             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1523             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1524             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1525             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1526             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1527             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1528             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1529             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1530             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1531             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1532             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1533             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1534             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1535             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1536             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1537             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1538             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1539             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1540         </fields>
1541         <links/>
1542         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1543             <actions>
1544                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1545                 <retrieve/>
1546                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1547                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1548             </actions>
1549         </permacrud>
1550     </class>
1551
1552     <class id="cwa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::weight_assoc" oils_persist:tablename="config.weight_assoc" reporter:label="Matrix Weight Association">
1553         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1554             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1555             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1556             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1557             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1558             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1559         </fields>
1560         <links>
1561             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1562             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1563             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1564         </links>
1565         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1566             <actions>
1567                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1568                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1569                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1570                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1571             </actions>
1572         </permacrud>
1573     </class>
1574
1575         <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">
1576                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1577                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1578                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1579                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1580                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1581                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1582                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1583                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1584                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1585                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1586                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1587                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1588                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1589                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1590                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1591                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1592                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1593             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1594                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1595                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1596                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1597                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1598                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1599                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1600                 </fields>
1601                 <links>
1602                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1603                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1604                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1605                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1606                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1607                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1608                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1609                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1610                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1611                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1612                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1613                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1614                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1615             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1616                 </links>
1617         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1618             <actions>
1619                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1620                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1621                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1622                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1623             </actions>
1624         </permacrud>
1625         </class>
1626
1627         <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">
1628                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1629                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1630                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1631                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1632                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1633                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1634                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1635                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1636                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1637                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1638                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1639                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1640                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1641                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1642                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1643                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1644             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1645                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1646                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1647             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1648                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1649                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1650                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1651                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1652             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1653             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1654             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1655                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1656                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1657                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1658                 </fields>
1659                 <links>
1660                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1661                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1662                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1663                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1664                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1665                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1666                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1667                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1668                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1669                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1670                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1671                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1672                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1673                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1674             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1675                 </links>
1676         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1677             <actions>
1678                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1679                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1680                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1681                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1682             </actions>
1683         </permacrud>
1684         </class>
1685
1686     <class id="cclg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_group" oils_persist:tablename="config.circ_limit_group" reporter:label="Circulation Limit Group">
1687         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1688             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1689             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1690             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1691         </fields>
1692         <links/>
1693         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1694             <actions>
1695                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1696                 <retrieve/>
1697                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1698                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1699             </actions>
1700         </permacrud>
1701     </class>
1702
1703     <class id="ccls" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set" oils_persist:tablename="config.circ_limit_set" reporter:label="Circulation Limit Set">
1704         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1705             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1706             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1707             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1708             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1709             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1710             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1711             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1712         </fields>
1713         <links>
1714             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1715         </links>
1716         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1717             <actions>
1718                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1719                 <retrieve/>
1720                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1721                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1722             </actions>
1723         </permacrud>
1724     </class>
1725
1726     <class id="ccmlsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_limit_set_map" oils_persist:tablename="config.circ_matrix_limit_set_map" reporter:label="Circulation Matrix Limit Set Map">
1727         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
1728             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1729             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
1730             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1731             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
1732             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1733         </fields>
1734         <links>
1735             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1736             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1737         </links>
1738         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1739             <actions>
1740                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1741                     <context link="matchpoint" field="org_unit"/>
1742                 </create>
1743                 <retrieve/>
1744                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1745                     <context link="matchpoint" field="org_unit"/>
1746                 </update>
1747                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1748                     <context link="matchpoint" field="org_unit"/>
1749                 </delete>
1750             </actions>
1751         </permacrud>
1752     </class>
1753
1754     <class id="cclscmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_circ_mod_map" oils_persist:tablename="config.circ_limit_set_circ_mod_map" reporter:label="Circulation Limit Set Circ Mod Map">
1755         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
1756             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1757             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1758             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1759         </fields>
1760         <links>
1761             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1762             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1763         </links>
1764         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1765             <actions>
1766                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1767                     <context link="limit_set" field="owning_lib"/>
1768                 </create>
1769                 <retrieve/>
1770                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1771                     <context link="limit_set" field="owning_lib"/>
1772                 </update>
1773                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1774                     <context link="limit_set" field="owning_lib"/>
1775                 </delete>
1776             </actions>
1777         </permacrud>
1778     </class>
1779     <class id="cclsacpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_copy_loc_map" oils_persist:tablename="config.circ_limit_set_copy_loc_map" reporter:label="Circulation Limit Set Copy Location Map">
1780         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
1781             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1782             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1783             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
1784         </fields>
1785         <links>
1786             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1787             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
1788         </links>
1789         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1790             <actions>
1791                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1792                     <context link="limit_set" field="owning_lib"/>
1793                 </create>
1794                 <retrieve/>
1795                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1796                     <context link="limit_set" field="owning_lib"/>
1797                 </update>
1798                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1799                     <context link="limit_set" field="owning_lib"/>
1800                 </delete>
1801             </actions>
1802         </permacrud>
1803     </class>
1804
1805     <class id="cclsgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_group_map" oils_persist:tablename="config.circ_limit_set_group_map" reporter:label="Circulation Limit Set Group Map">
1806         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
1807             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1808             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1809             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
1810             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
1811         </fields>
1812         <links>
1813             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1814             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
1815         </links>
1816         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1817             <actions>
1818                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1819                     <context link="limit_set" field="owning_lib"/>
1820                 </create>
1821                 <retrieve/>
1822                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1823                     <context link="limit_set" field="owning_lib"/>
1824                 </update>
1825                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1826                     <context link="limit_set" field="owning_lib"/>
1827                 </delete>
1828             </actions>
1829         </permacrud>
1830     </class>
1831
1832         <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">
1833                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1834                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1835                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1836                 </fields>
1837                 <links/>
1838         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1839             <actions>
1840                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1841                 <retrieve/>
1842                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1843                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1844             </actions>
1845         </permacrud>
1846         </class>
1847
1848         <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">
1849                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1850                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1851                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1852                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1853                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1854                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1855                 </fields>
1856                 <links>
1857                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1858                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1859                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1860                 </links>
1861         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1862             <actions>
1863                 <create permission="ADMIN_SURVEY">
1864                     <context link="survey" field="owner"/>
1865                 </create>
1866                 <retrieve/>
1867                 <update permission="ADMIN_SURVEY">
1868                     <context link="survey" field="owner"/>
1869                 </update>
1870                 <delete permission="ADMIN_SURVEY">
1871                     <context link="survey" field="owner"/>
1872                 </delete>
1873             </actions>
1874         </permacrud>
1875         </class>
1876         <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">
1877                 <fields oils_persist:primary="id" oils_persist:sequence="">
1878                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1879                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1880                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1881                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1882                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1883                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1884                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1885                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1886                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1887                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1888                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1889                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1890                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1891                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1892                 </fields>
1893                 <links>
1894                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1895                 </links>
1896         </class>
1897         <class id="mbtslv" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction_summary_location_view" oils_persist:tablename="money.billable_xact_summary_location_view" reporter:label="Billable Transaction Summary with Billing Location" oils_persist:readonly="true" reporter:core="true">
1898                 <fields oils_persist:primary="id" oils_persist:sequence="">
1899                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1900                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1901                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1902                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1903                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1904                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1905                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1906                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1907                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1908                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1909                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1910                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1911                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1912                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1913                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1914                 </fields>
1915                 <links>
1916                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1917                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1918                 </links>
1919         </class>
1920         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1921                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1922                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1923                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1924                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1925                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1926                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1927                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1928                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1929                 </fields>
1930                 <links>
1931                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1932                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1933                 </links>
1934         </class>
1935         <class id="aupr" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_password_reset" oils_persist:tablename="actor.usr_password_reset" reporter:label="User password reset requests">
1936                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1937                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1938                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1939                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1940                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1941                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1942                 </fields>
1943                 <links>
1944                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1945                 </links>
1946         </class>
1947         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1948                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1949                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1950                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1951                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1952                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1953                 </fields>
1954                 <links>
1955                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1956                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1957                 </links>
1958         </class>
1959         <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">
1960                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1961                         <field name="field" reporter:datatype="link"/>
1962                         <field name="id" reporter:datatype="id" />
1963                         <field name="source" reporter:datatype="link"/>
1964                         <field name="value" reporter:datatype="text"/>
1965                 </fields>
1966                 <links>
1967                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1968                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1969                 </links>
1970         </class>
1971         <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">
1972                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1973                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1974                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1975                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1976                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1977                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1978                 </fields>
1979                 <links>
1980                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1981                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1982                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1983                 </links>
1984         </class>
1985         <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">
1986                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1987                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1988                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1989                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1990                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1991                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1992                 </fields>
1993                 <links>
1994                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1995                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1996                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1997                 </links>
1998         </class>
1999         <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">
2000                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2001                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2002                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2003                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2004                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2005                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2006                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2007                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2008                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2009                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2010                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2011                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2012                 </fields>
2013                 <links>
2014                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2015                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2016                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2017                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2018                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2019                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2020                 </links>
2021         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2022             <actions>
2023                 <create permission="TRANSIT_COPY" context_field="owner">
2024                     <context link="target_copy" field="circ_lib"/>
2025                 </create>
2026                 <retrieve/>
2027                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2028                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2029             </actions>
2030         </permacrud>
2031         </class>
2032         <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">
2033                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2034                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2035                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2036                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2037                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2038                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2039                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2040                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2041                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2042                 </fields>
2043                 <links>
2044                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2045                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2046                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2047                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2048                 </links>
2049         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2050             <actions>
2051                 <create permission="ADMIN_SURVEY">
2052                     <context link="survey" field="owner"/>
2053                 </create>
2054                 <retrieve/>
2055                 <update permission="ADMIN_SURVEY">
2056                     <context link="survey" field="owner"/>
2057                 </update>
2058                 <delete permission="ADMIN_SURVEY">
2059                     <context link="survey" field="owner"/>
2060                 </delete>
2061             </actions>
2062         </permacrud>
2063         </class>
2064         <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">
2065                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2066                         <field name="bucket" />
2067                         <field name="id" reporter:datatype="id" />
2068                         <field name="target_copy" reporter:datatype="link"/>
2069                         <field name="create_time" reporter:datatype="timestamp" />
2070                         <field name="pos" reporter:datatype="int" />
2071                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2072                 </fields>
2073                 <links>
2074                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2075                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2076             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2077                 </links>
2078         </class>
2079         <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">
2080                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2081                         <field name="id" reporter:datatype="id" />
2082                         <field name="item" reporter:datatype="link"/>
2083                         <field name="note" reporter:datatype="text" />
2084                 </fields>
2085                 <links>
2086                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2087                 </links>
2088         </class>
2089
2090         <class id="acs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set" oils_persist:tablename="authority.control_set" reporter:label="Authority Control Set" oils_persist:field_safe="true">
2091                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2092                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2093                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2094                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2095                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2096                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2097                 </fields>
2098                 <links>
2099                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2100                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2101                 </links>
2102                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2103                         <actions>
2104                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2105                                 <retrieve/>
2106                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2107                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2108                         </actions>
2109                 </permacrud>
2110         </class>
2111
2112         <class id="acsaf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_authority_field" oils_persist:tablename="authority.control_set_authority_field" reporter:label="Authority Control Set Authority Field" oils_persist:field_safe="true">
2113                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2114                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2115                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2116                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2117                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2118                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2119                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2120                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2121                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2122                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2123                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2124                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2125                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2126                 </fields>
2127                 <links>
2128                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2129                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2130                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2131                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2132                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2133                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2134                 </links>
2135                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2136                         <actions>
2137                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2138                                 <retrieve/>
2139                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2140                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2141                         </actions>
2142                 </permacrud>
2143         </class>
2144
2145         <class id="acsbf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_bib_field" oils_persist:tablename="authority.control_set_bib_field" reporter:label="Authority Control Set Bib Field" oils_persist:field_safe="true">
2146                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2147                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2148                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2149                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2150                 </fields>
2151                 <links>
2152                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2153                 </links>
2154                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2155                         <actions>
2156                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2157                                 <retrieve/>
2158                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2159                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2160                         </actions>
2161                 </permacrud>
2162         </class>
2163
2164         <class id="at" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::thesaurus" oils_persist:tablename="authority.thesaurus" reporter:label="Authority Thesaurus" oils_persist:field_safe="true">
2165                 <fields oils_persist:primary="code">
2166                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2167                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2168                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2169                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2170                 </fields>
2171                 <links>
2172                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2173                 </links>
2174                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2175                         <actions>
2176                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2177                                 <retrieve/>
2178                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2179                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2180                         </actions>
2181                 </permacrud>
2182         </class>
2183
2184         <class id="aba" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::browse_axis" oils_persist:tablename="authority.browse_axis" reporter:label="Authority Browse Axis" oils_persist:field_safe="true">
2185                 <fields oils_persist:primary="code">
2186                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2187                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2188                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2189                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2190                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2191                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2192                 </fields>
2193                 <links>
2194                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2195                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2196                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2197                 </links>
2198                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2199                         <actions>
2200                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2201                                 <retrieve/>
2202                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2203                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2204                         </actions>
2205                 </permacrud>
2206         </class>
2207
2208     <class id="abaafm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::browse_axis_authority_field_map" oils_persist:tablename="authority.browse_axis_authority_field_map" reporter:label="Authority Browse Axis Field Map" oils_persist:field_safe="true">
2209         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2210             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2211             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2212             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2213         </fields>
2214         <links>
2215             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2216             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2217         </links>
2218         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2219             <actions>
2220                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2221                 <retrieve/>
2222                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2223                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2224             </actions>
2225         </permacrud>
2226     </class>
2227
2228         <class id="are" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::record_entry" oils_persist:tablename="authority.record_entry" reporter:label="Authority Record Entry">
2229                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2230                         <field name="active" reporter:datatype="bool"/>
2231                         <field name="create_date" reporter:datatype="timestamp"/>
2232                         <field name="creator" />
2233                         <field name="deleted" reporter:datatype="bool"/>
2234                         <field name="edit_date" reporter:datatype="timestamp"/>
2235                         <field name="editor" />
2236                         <field name="id" reporter:datatype="id" />
2237                         <field name="last_xact_id" />
2238                         <field name="marc" />
2239                         <field name="source" />
2240                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2241                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2242                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2243                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2244                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2245                 </fields>
2246                 <links>
2247                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2248                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2249                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2250                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2251                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2252                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2253                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2254                 </links>
2255                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2256                         <actions>
2257                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2258                                 <retrieve/>
2259                                 <update permission="UPDATE_MARC" global_required="true"/>
2260                                 <delete permission="UPDATE_MARC" global_required="true"/>
2261                         </actions>
2262                 </permacrud>
2263         </class>
2264         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2265                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2266                         <field name="char_encoding" />
2267                         <field name="id" />
2268                         <field name="record" />
2269                         <field name="record_status" />
2270                         <field name="thesaurus" />
2271                 </fields>
2272                 <links>
2273                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2274                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2275                 </links>
2276         </class>
2277         <class id="abl" controller="open-ils.cstore" oils_obj:fieldmapper="authority::bib_linking" oils_persist:tablename="authority.bib_linking" reporter:label="Authority-Bibliographic Record Link">
2278                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2279                         <field name="id" reporter:datatype="id" />
2280                         <field name="bib" reporter:datatype="link" />
2281                         <field name="authority" reporter:datatype="link" />
2282                 </fields>
2283                 <links>
2284                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2285                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2286                 </links>
2287         </class>
2288         <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">
2289                 <fields oils_persist:primary="code" oils_persist:sequence="">
2290                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2291                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2292                 </fields>
2293                 <links/>
2294         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2295             <actions>
2296                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2297                 <retrieve/>
2298                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2299                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2300             </actions>
2301         </permacrud>
2302         </class>
2303         <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">
2304                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2305                         <field name="accepting_usr" />
2306                         <field name="amount" reporter:datatype="money" />
2307                         <field name="amount_collected" reporter:datatype="money" />
2308                         <field name="approval_code" reporter:datatype="text"/>
2309                         <field name="cash_drawer" reporter:datatype="link"/>
2310                         <field name="cc_first_name" reporter:datatype="text"/>
2311                         <field name="cc_last_name" reporter:datatype="text"/>
2312                         <field name="cc_number" reporter:datatype="text"/>
2313                         <field name="cc_order_number" reporter:datatype="text"/>
2314                         <field name="cc_type" reporter:datatype="text"/>
2315                         <field name="cc_processor" reporter:datatype="text"/>
2316                         <field name="expire_month" reporter:datatype="int" />
2317                         <field name="expire_year" reporter:datatype="int" />
2318                         <field name="id" reporter:datatype="id" />
2319                         <field name="note" reporter:datatype="text"/>
2320                         <field name="payment_ts" reporter:datatype="timestamp"/>
2321                         <field name="xact" reporter:datatype="link"/>
2322                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2323                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2324                 </fields>
2325                 <links>
2326                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2327                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2328                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2329                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2330                 </links>
2331         </class>
2332         <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">
2333                 <fields oils_persist:primary="name">
2334                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2335                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2336                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2337                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2338                 </fields>
2339                 <links/>
2340         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2341             <actions>
2342                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2343                 <retrieve/>
2344                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2345                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2346             </actions>
2347         </permacrud>
2348         </class>
2349
2350         <class id="cmsa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_search_alias" oils_persist:tablename="config.metabib_search_alias" reporter:label="Metabib Search Alias" oils_persist:field_safe="true">
2351                 <fields oils_persist:primary="alias">
2352                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2353                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2354                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2355                 </fields>
2356                 <links>
2357                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2358                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2359                 </links>
2360         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2361             <actions>
2362                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2363                 <retrieve/>
2364                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2365                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2366             </actions>
2367         </permacrud>
2368         </class>
2369
2370         <class id="cmc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_class" oils_persist:tablename="config.metabib_class" reporter:label="Metabib Class" oils_persist:field_safe="true">
2371                 <fields oils_persist:primary="name">
2372                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2373                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2374                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2375                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2376                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2377                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2378                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2379                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2380                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2381                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2382                 </fields>
2383                 <links>
2384                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2385                 </links>
2386         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2387             <actions>
2388                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2389                 <retrieve/>
2390                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2391                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2392             </actions>
2393         </permacrud>
2394         </class>
2395
2396         <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" oils_persist:field_safe="true">
2397                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2398                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2399                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2400                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2401                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2402                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2403                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2404                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2405                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2406                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2407                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2408                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2409                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2410                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2411                 </fields>
2412                 <links>
2413                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2414                 </links>
2415         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2416             <actions>
2417                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2418                 <retrieve/>
2419                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2420                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2421             </actions>
2422         </permacrud>
2423         </class>
2424         <class id="cbho" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::best_hold_order" oils_persist:tablename="config.best_hold_order" reporter:label="Best-Hold Sort Order">
2425                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2426                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2427                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2428                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2429                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2430                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2431                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2432                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2433                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2434                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2435                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2436                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2437                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2438                 </fields>
2439                 <links>
2440                 </links>
2441                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2442                         <actions>
2443                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2444                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2445                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2446                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2447                         </actions>
2448                 </permacrud>
2449         </class>
2450         <class id="cbfp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::biblio_fingerprint" oils_persist:tablename="config.biblio_fingerprint" reporter:label="Fingerprint Definition">
2451                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2452                         <field name="id" reporter:datatype="id" />
2453                         <field name="name" reporter:datatype="text"/>
2454                         <field name="xpath" reporter:datatype="text"/>
2455                         <field name="format" reporter:datatype="link"/>
2456                         <field name="first_word" reporter:datatype="bool" />
2457                 </fields>
2458                 <links/>
2459         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2460             <actions>
2461                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2462                 <retrieve/>
2463                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2464                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2465             </actions>
2466         </permacrud>
2467         </class>
2468         <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">
2469                 <fields oils_persist:primary="code" oils_persist:sequence="">
2470                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2471                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2472                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2473                 </fields>
2474                 <links/>
2475         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2476             <actions>
2477                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2478                 <retrieve/>
2479                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2480                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2481             </actions>
2482         </permacrud>
2483         </class>
2484         <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">
2485                 <fields oils_persist:primary="code" oils_persist:sequence="">
2486                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2487                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2488                 </fields>
2489                 <links/>
2490         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2491             <actions>
2492                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2493                 <retrieve/>
2494                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2495                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2496             </actions>
2497         </permacrud>
2498         </class>
2499     <class id="acnc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_class" oils_persist:tablename="asset.call_number_class" reporter:label="Call number classification scheme">
2500         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2501             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2502             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2503             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2504             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2505         </fields>
2506         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2507             <actions>
2508                 <retrieve/>
2509             </actions>
2510         </permacrud>
2511     </class>
2512         <class id="acns" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_suffix" oils_persist:tablename="asset.call_number_suffix" reporter:label="Call Number/Volume Suffix">
2513                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2514                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2515                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2516                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2517                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2518                 </fields>
2519                 <links>
2520                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2521                 </links>
2522         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2523             <actions>
2524                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2525                 <retrieve/>
2526                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2527                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2528             </actions>
2529         </permacrud>
2530         </class>
2531         <class id="acnp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_prefix" oils_persist:tablename="asset.call_number_prefix" reporter:label="Call Number/Volume Prefix">
2532                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2533                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2534                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2535                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2536                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2537                 </fields>
2538                 <links>
2539                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2540                 </links>
2541         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2542             <actions>
2543                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2544                 <retrieve/>
2545                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2546                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2547             </actions>
2548         </permacrud>
2549         </class>
2550         <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">
2551                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2552                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2553                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2554                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2555                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2556                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2557                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2558                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2559                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2560                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2561                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2562                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2563                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2564                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2565                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2566                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2567                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2568                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2569                 </fields>
2570                 <links>
2571                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2572                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2573                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2574                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2575                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2576                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2577                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2578                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2579                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2580                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2581                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2582                 </links>
2583         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2584             <actions>
2585                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2586                 <retrieve/>
2587                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2588                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2589             </actions>
2590         </permacrud>
2591         </class>
2592         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2593                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2594                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2595                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2596                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2597                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2598                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2599                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2600                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2601                 </fields>
2602                 <links>
2603                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2604                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2605         </links>
2606         </class>
2607         <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">
2608                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2609                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2610                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2611                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2612                 </fields>
2613                 <links>
2614                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2615                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2616                 </links>
2617         </class>
2618         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2619                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2620                         <field name="id" reporter:datatype="id" />
2621                         <field name="value" oils_persist:i18n="true" />
2622                 </fields>
2623                 <links/>
2624         </class>
2625         <class id="mous" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::open_user_summary" oils_persist:tablename="money.open_usr_summary" reporter:label="Open User Summary">
2626                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2627                         <field name="balance_owed" reporter:datatype="money" />
2628                         <field name="total_owed" reporter:datatype="money" />
2629                         <field name="total_paid" reporter:datatype="money" />
2630                         <field name="usr" reporter:datatype="link"/>
2631                 </fields>
2632                 <links>
2633                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2634         </links>
2635         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2636             <actions>
2637                 <retrieve permission="VIEW_USER">
2638                     <context link="usr" field="home_ou"/>
2639                 </retrieve>
2640             </actions>
2641         </permacrud>
2642         </class>
2643         <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">
2644                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2645                         <field name="collector" />
2646                         <field name="enter_time" reporter:datatype="timestamp"/>
2647                         <field name="id" reporter:datatype="id" />
2648                         <field name="location" reporter:datatype="link"/>
2649                         <field name="usr" reporter:datatype="link"/>
2650                 </fields>
2651                 <links>
2652                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2653                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2654                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2655                 </links>
2656         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2657             <actions>
2658                 <create permission="money.collections_tracker.create" context_field="location"/>
2659                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2660                 <delete permission="money.collections_tracker.create" context_field="location"/>
2661             </actions>
2662         </permacrud>
2663         </class>
2664         <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">
2665                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2666                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2667                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2668                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2669                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2670                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2671                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2672                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2673                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2674                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2675                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2676                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2677                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2678                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2679                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2680                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2681                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2682                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2683                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2684                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2685                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2686                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2687                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2688                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2689                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2690                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2691                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2692                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2693                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2694                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2695                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2696                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2697                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2698                 </fields>
2699                 <links>
2700                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2701                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2702                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2703                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2704                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2705                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2706                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2707                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2708                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2709                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2710                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2711                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2712                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2713                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2714                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2715                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2716                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2717                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2718                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2719                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
2720                 </links>
2721         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2722             <actions>
2723                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2724                 <retrieve/>
2725                 <update permission="UPDATE_MARC" global_required="true"/>
2726             </actions>
2727         </permacrud>
2728         </class>
2729         <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">
2730                 <fields oils_persist:primary="id">
2731                         <field name="dow_0_close" />
2732                         <field name="dow_0_open" />
2733                         <field name="dow_1_close" />
2734                         <field name="dow_1_open" />
2735                         <field name="dow_2_close" />
2736                         <field name="dow_2_open" />
2737                         <field name="dow_3_close" />
2738                         <field name="dow_3_open" />
2739                         <field name="dow_4_close" />
2740                         <field name="dow_4_open" />
2741                         <field name="dow_5_close" />
2742                         <field name="dow_5_open" />
2743                         <field name="dow_6_close" />
2744                         <field name="dow_6_open" />
2745                         <field name="id" reporter:datatype="id" />
2746                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2747                 </fields>
2748                 <links>
2749                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2750                 </links>
2751         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2752             <actions>
2753                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2754                 <retrieve/>
2755                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2756                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2757             </actions>
2758         </permacrud>
2759         </class>
2760         <class id="bmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::monograph_part" oils_persist:tablename="biblio.monograph_part" reporter:label="Monograph Parts" oils_persist:field_safe="true">
2761                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2762                         <field name="id" reporter:datatype="id" />
2763                         <field name="record" reporter:datatype="link"/>
2764                         <field name="label" reporter:datatype="text"/>
2765                         <field name="label_sortkey" reporter:datatype="text"/>
2766                 </fields>
2767                 <links>
2768                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2769                 </links>
2770         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2771             <actions>
2772                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2773                 <retrieve/>
2774                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2775                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2776             </actions>
2777         </permacrud>
2778         </class>
2779         <class id="acpm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_part_map" oils_persist:tablename="asset.copy_part_map" reporter:label="Copy Monograph Part Map">
2780                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2781                         <field name="id" reporter:datatype="id" />
2782                         <field name="target_copy" reporter:datatype="link" />
2783                         <field name="part" reporter:datatype="link"/>
2784                 </fields>
2785                 <links>
2786                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2787                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2788                 </links>
2789         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2790             <actions>
2791                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2792                 <retrieve/>
2793                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2794                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2795             </actions>
2796         </permacrud>
2797         </class>
2798         <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">
2799                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2800                         <field name="close_end" reporter:datatype="timestamp" />
2801                         <field name="close_start" reporter:datatype="timestamp" />
2802                         <field name="id" reporter:datatype="id" />
2803                         <field name="org_unit" reporter:datatype="org_unit"/>
2804                         <field name="reason" reporter:datatype="text"/>
2805                 </fields>
2806                 <links>
2807                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2808                 </links>
2809         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2810             <actions>
2811                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2812                 <retrieve/>
2813                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2814                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2815             </actions>
2816         </permacrud>
2817         </class>
2818         <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">
2819                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2820                         <field name="extended" reporter:datatype="interval"/>
2821                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2822                         <field name="max_renewals" reporter:datatype="int" />
2823                         <field name="name" reporter:datatype="text"/>
2824                         <field name="normal" reporter:datatype="interval"/>
2825                         <field name="shrt" reporter:datatype="interval"/>
2826                 </fields>
2827                 <links>
2828                 </links>
2829         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2830             <actions>
2831                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2832                 <retrieve/>
2833                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2834                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2835             </actions>
2836         </permacrud>
2837         </class>
2838
2839         <class id="chdd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hard_due_date" oils_persist:tablename="config.hard_due_date" reporter:label="Hard Due Date">
2840                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2841                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2842                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2843             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2844                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2845             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2846                 </fields>
2847                 <links>
2848             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2849                 </links>
2850                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2851             <actions>
2852                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2853                 <retrieve/>
2854                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2855                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2856             </actions>
2857                 </permacrud>
2858         </class>
2859
2860         <class id="chddv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hard_due_date_values" oils_persist:tablename="config.hard_due_date_values" reporter:label="Hard Due Date Values">
2861                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2862                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2863                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2864                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2865             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2866                 </fields>
2867                 <links>
2868                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2869                 </links>
2870                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2871             <actions>
2872                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2873                 <retrieve/>
2874                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2875                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2876             </actions>
2877                 </permacrud>
2878         </class>
2879
2880         <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">
2881                 <fields oils_persist:primary="id" oils_persist:sequence="">
2882                         <field name="balance_owed" reporter:datatype="money"/>
2883                         <field name="id" reporter:datatype="id" />
2884                         <field name="last_billing_note" reporter:datatype="text"/>
2885                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2886                         <field name="last_billing_type" reporter:datatype="text"/>
2887                         <field name="last_payment_note" reporter:datatype="text"/>
2888                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2889                         <field name="last_payment_type" reporter:datatype="text"/>
2890                         <field name="total_owed" reporter:datatype="money"/>
2891                         <field name="total_paid" reporter:datatype="money"/>
2892                         <field name="usr" reporter:datatype="link"/>
2893                         <field name="xact_finish" reporter:datatype="timestamp" />
2894                         <field name="xact_start" reporter:datatype="timestamp" />
2895                         <field name="xact_type" reporter:datatype="text"/>
2896                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
2897                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2898                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2899                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
2900                         <field name="billing_location" reporter:datatype="link"/>
2901                 </fields>
2902                 <links>
2903                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2904                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2905                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2906                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2907                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
2908                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2909                 </links>
2910         </class>
2911         <class id="au" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
2912                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2913                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2914                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2915                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2916                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2917                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2918                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2919                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2920                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2921                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2922                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2923                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2924                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2925                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2926                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2927                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2928                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2929                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2930                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2931                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2932                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2933                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2934                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2935                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2936                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2937                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2938                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2939                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2940                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2941                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2942                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2943                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2944                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2945                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2946                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2947                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2948                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2949                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2950                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2951                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
2952                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2953                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
2954                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2955                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2956                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2957                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
2958                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2959                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2960                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2961                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2962                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2963                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
2964                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2965                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2966                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2967                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2968                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2969                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2970                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2971                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2972                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2973                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2974                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2975                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
2976                 </fields>
2977                 <links>
2978                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2979                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2980                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2981                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2982                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2983                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2984                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2985                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2986                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2987                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2988                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2989                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2990                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2991                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2992                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2993                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2994                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2995                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2996                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2997                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
2998                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
2999                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3000                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3001                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3002                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3003                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3004                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3005                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3006                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3007                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3008                 </links>
3009                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3010                         <actions>
3011                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3012                         </actions>
3013                 </permacrud>
3014         </class>
3015         <class id="cuat" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::usr_activity_type" oils_persist:tablename="config.usr_activity_type" reporter:label="User Activity Type">
3016                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3017                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3018                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3019                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3020                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3021                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3022                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3023                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3024                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3025         </fields>
3026                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3027                         <actions>
3028                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3029                                 <retrieve/>
3030                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3031                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3032                         </actions>
3033                 </permacrud>
3034         </class>
3035         <class id="auact" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_activity" oils_persist:tablename="actor.usr_activity" reporter:label="User Activity">
3036                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3037                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3038                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3039                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3040                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3041         </fields>
3042         <links>
3043                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3044                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3045                 </links>
3046                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3047                         <actions>
3048                                 <retrieve permission="RUN_REPORTS">
3049                                         <context link="usr" field="home_ou" />
3050                                 </retrieve>
3051                         </actions>
3052                 </permacrud>
3053         </class>
3054         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3055                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3056                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3057                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3058                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3059                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3060                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3061                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3062         </fields>
3063         <links>
3064                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3065                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3066                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3067                 </links>
3068                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3069                         <actions>
3070                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3071                                         <context link="usr" field="home_ou" />
3072                                         <context link="ws" field="owning_lib" />
3073                                 </retrieve>
3074                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3075                                         <context link="usr" field="home_ou" />
3076                                         <context link="ws" field="owning_lib" />
3077                                 </create>
3078                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3079                                         <context link="usr" field="home_ou" />
3080                                         <context link="ws" field="owning_lib" />
3081                                 </update>
3082                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3083                                         <context link="usr" field="home_ou" />
3084                                         <context link="ws" field="owning_lib" />
3085                                 </delete>
3086                         </actions>
3087                 </permacrud>
3088         </class>
3089         <class id="csg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::settings_group" oils_persist:tablename="config.settings_group" reporter:label="Settings Group">
3090                 <fields oils_persist:primary="name">
3091                         <field name="name" reporter:datatype="text"/>
3092                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3093                 </fields>
3094                 <links/>
3095                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3096                         <actions>
3097                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3098                                 <retrieve/>
3099                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3100                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3101                         </actions>
3102                 </permacrud>
3103         </class>
3104         <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">
3105                 <fields oils_persist:primary="name">
3106                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3107                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3108                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
3109                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3110                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
3111                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3112                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3113                 </fields>
3114                 <links>
3115                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3116                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3117                 </links>
3118                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3119                         <actions>
3120                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3121                                 <retrieve/>
3122                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3123                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3124                         </actions>
3125                 </permacrud>
3126         </class>
3127         <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">
3128                 <fields oils_persist:primary="name">
3129                         <field name="name" reporter:datatype="text"/>
3130                         <field name="label" reporter:datatype="text"/>
3131                         <field name="description" reporter:datatype="text"/>
3132                         <field name="datatype" reporter:datatype="text"/>
3133                         <field name="view_perm" reporter:datatype="link"/>
3134                         <field name="update_perm" reporter:datatype="link"/>
3135                         <field name="fm_class" reporter:datatype="text"/>
3136                         <field name="grp" reporter:datatype="link"/>
3137                 </fields>
3138                 <links>
3139                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3140                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3141                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3142                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3143                 </links>
3144                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3145                         <actions>
3146                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3147                                 <retrieve/>
3148                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3149                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3150                         </actions>
3151                 </permacrud>
3152         </class>
3153         <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">
3154                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3155                         <field name="id" />
3156                         <field name="name"  reporter:datatype="text"/>
3157                         <field name="org_unit" reporter:datatype="org_unit"/>
3158                         <field name="value"  reporter:datatype="text"/>
3159                 </fields>
3160                 <links>
3161                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3162                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3163                 </links>
3164         </class>
3165         <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">
3166                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3167                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3168                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3169                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3170                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3171                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3172                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3173                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3174                 </fields>
3175                 <links>
3176                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3177                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3178                 </links>
3179         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3180             <actions>
3181                 <create permission="CREATE_COPY_NOTE">
3182                     <context link="owning_copy" field="circ_lib"/>
3183                 </create>
3184                 <retrieve permission="VIEW_COPY_NOTES">
3185                     <context link="owning_copy" field="circ_lib"/>
3186                 </retrieve>
3187                 <update permission="UPDATE_COPY_NOTE">
3188                     <context link="owning_copy" field="circ_lib"/>
3189                 </update>
3190                 <delete permission="DELETE_COPY_NOTE">
3191                     <context link="owning_copy" field="circ_lib"/>
3192                 </delete>
3193             </actions>
3194         </permacrud>
3195         </class>
3196         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3197                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3198                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3199                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3200                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3201                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3202                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3203                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3204                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3205                 </fields>
3206                 <links>
3207                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3208                 </links>
3209         </class>
3210         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3211                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3212                         <field name="fingerprint"  reporter:datatype="text"/>
3213                         <field name="id" reporter:datatype="id" />
3214                         <field name="master_record" reporter:datatype="link"/>
3215                         <field name="mods"  reporter:datatype="text"/>
3216                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3217                 </fields>
3218                 <links>
3219                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3220                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3221                 </links>
3222         </class>
3223         <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">
3224                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3225                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3226                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3227                 </fields>
3228                 <links/>
3229         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3230             <actions>
3231                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3232                 <retrieve/>
3233                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3234                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3235             </actions>
3236         </permacrud>
3237         </class>
3238         <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">
3239                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3240                         <field name="code"  reporter:datatype="text"/>
3241                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3242                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3243                 </fields>
3244                 <links/>
3245         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3246             <actions>
3247                 <create permission="CREATE_PERM" global_required="true"/>
3248                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3249                 <update permission="UPDATE_PERM" global_required="true"/>
3250                 <delete permission="DELETE_PERM" global_required="true"/>
3251             </actions>
3252         </permacrud>
3253         </class>
3254         <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">
3255                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3256                         <field name="id" reporter:datatype="id" />
3257                         <field name="metarecord" reporter:datatype="link"/>
3258                         <field name="source" reporter:datatype="link"/>
3259                 </fields>
3260                 <links>
3261                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3262                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3263                 </links>
3264         </class>
3265         <class id="mfae" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::facet_entry" oils_persist:tablename="metabib.facet_entry" reporter:label="Combined Facet Entry" oils_persist:readonly="true">
3266                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3267                         <field name="id" reporter:datatype="id" />
3268                         <field name="field" reporter:datatype="link"/>
3269                         <field name="source" reporter:datatype="link"/>
3270                         <field name="value"  reporter:datatype="text"/>
3271                 </fields>
3272                 <links>
3273                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3274                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3275                 </links>
3276         </class>
3277         <class id="mbe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry" oils_persist:tablename="metabib.browse_entry" reporter:label="Combined Browse Entry" oils_persist:readonly="true">
3278                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3279                         <field name="id" reporter:datatype="id" />
3280                         <field name="value" reporter:datatype="text"/>
3281                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3282                 </fields>
3283                 <links>
3284                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3285                 </links>
3286         </class>
3287         <class id="mbedm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry_def_map" oils_persist:tablename="metabib.browse_entry_def_map" reporter:label="Combined Browse Entry Definition Map" oils_persist:readonly="true">
3288                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3289                         <field name="id" reporter:datatype="id" />
3290                         <field name="entry" reporter:datatype="link"/>
3291                         <field name="def" reporter:datatype="link"/>
3292                         <field name="source" reporter:datatype="link"/>
3293                 </fields>
3294                 <links>
3295                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3296                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3297                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3298                 </links>
3299         </class>
3300         <class id="mfe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::field_entry" reporter:label="Combined Field Entry View" oils_persist:readonly="true">
3301                 <oils_persist:source_definition>
3302                         SELECT * FROM metabib.author_field_entry
3303                                                 UNION ALL
3304                         SELECT * FROM metabib.keyword_field_entry
3305                                                 UNION ALL
3306                         SELECT * FROM metabib.identifier_field_entry
3307                                                 UNION ALL
3308                         SELECT * FROM metabib.title_field_entry
3309                                                 UNION ALL
3310                         SELECT * FROM metabib.subject_field_entry
3311                                                 UNION ALL
3312                         SELECT * FROM metabib.series_field_entry
3313                 </oils_persist:source_definition>
3314                 <fields>
3315                         <field name="field" reporter:datatype="link"/>
3316                         <field name="id" reporter:datatype="id" />
3317                         <field name="source" reporter:datatype="link"/>
3318                         <field name="value"  reporter:datatype="text"/>
3319                 </fields>
3320                 <links>
3321                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3322                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3323                 </links>
3324         </class>
3325         <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">
3326                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3327                         <field name="field" reporter:datatype="link"/>
3328                         <field name="id" reporter:datatype="id" />
3329                         <field name="source" reporter:datatype="link"/>
3330                         <field name="value"  reporter:datatype="text"/>
3331                 </fields>
3332                 <links>
3333                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3334                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3335                 </links>
3336         </class>
3337         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
3338                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3339                         <field name="accepting_usr" reporter:datatype="link"/>
3340                         <field name="amount" reporter:datatype="money" />
3341                         <field name="amount_collected" reporter:datatype="money" />
3342                         <field name="cash_drawer" reporter:datatype="link"/>
3343                         <field name="id" reporter:datatype="id" />
3344                         <field name="note"  reporter:datatype="text"/>
3345                         <field name="payment_ts" reporter:datatype="timestamp"/>
3346                         <field name="xact" reporter:datatype="link"/>
3347                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3348                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3349                 </fields>
3350                 <links>
3351                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3352                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3353                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3354                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3355                 </links>
3356         </class>
3357         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
3358                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3359                         <field name="accepting_usr" reporter:datatype="link"/>
3360                         <field name="amount" reporter:datatype="money" />
3361                         <field name="amount_collected" reporter:datatype="money" />
3362                         <field name="id" reporter:datatype="id" />
3363                         <field name="note"  reporter:datatype="text"/>
3364                         <field name="payment_ts" reporter:datatype="timestamp"/>
3365                         <field name="xact" reporter:datatype="link"/>
3366                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3367                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3368                 </fields>
3369                 <links>
3370                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3371                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3372                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3373                 </links>
3374         </class>
3375         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3376                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3377                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3378                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3379                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3380                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3381                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3382                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3383                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3384                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3385                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3386                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3387                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3388                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3389                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3390                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3391                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3392                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3393                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3394                 </fields>
3395                 <links>
3396                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3397                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3398                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3399                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3400                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3401                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3402                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3403                 </links>
3404         </class>
3405
3406         <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">
3407                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3408                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3409                         <field name="name"  reporter:datatype="text"/>
3410                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3411                         <field name="block_list" reporter:datatype="text"/>
3412                         <field name="staff_alert" reporter:datatype="bool"/>
3413                         <field name="org_depth" reporter:datatype="int"/>
3414                 </fields>
3415                 <links/>
3416         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3417             <actions>
3418                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3419                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3420                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3421                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3422             </actions>
3423         </permacrud>
3424         </class>
3425         <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">
3426                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3427                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3428                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3429                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3430                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3431                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3432                 </fields>
3433                 <links>
3434                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3435                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3436                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3437         </links>
3438         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3439             <actions>
3440                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3441                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3442                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3443                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3444             </actions>
3445         </permacrud>
3446         </class>
3447         <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" oils_persist:field_safe="true">
3448                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3449                         <field name="holdable" reporter:datatype="bool"/>
3450                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3451                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3452                         <field name="opac_visible" reporter:datatype="bool"/>
3453             <field name="copy_active" reporter:datatype="bool"/>
3454             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3455                 </fields>
3456                 <links/>
3457         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3458             <actions>
3459                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3460                 <retrieve/>
3461                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3462                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3463             </actions>
3464         </permacrud>
3465         </class>
3466         <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">
3467                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3468                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3469                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3470                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3471                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3472                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3473                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3474                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3475                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3476                 </fields>
3477                 <links>
3478                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3479                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3480                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3481                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3482                 </links>
3483                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3484                         <actions>
3485                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3486                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3487                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3488                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3489                         </actions>
3490                 </permacrud>
3491         </class>
3492         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3493                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3494                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3495                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3496                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3497                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3498                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3499                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3500                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3501                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3502                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3503                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3504                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3505                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3506                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3507                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3508                 </fields>
3509                 <links>
3510                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3511                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3512                 </links>
3513         </class>
3514         <class id="aal" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::address_alert" oils_persist:tablename="actor.address_alert" reporter:label="Address Alert">
3515                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3516                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3517                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3518                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3519                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3520                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3521                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3522                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3523                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3524                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3525                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3526                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3527                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3528                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3529                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3530                 </fields>
3531                 <links>
3532                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3533                 </links>
3534                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3535                         <actions>
3536                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3537                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3538                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3539                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3540                         </actions>
3541                 </permacrud>
3542         </class>
3543
3544
3545         <class id="auss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_saved_search" oils_persist:tablename="actor.usr_saved_search" reporter:label="User Saved Search">
3546                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3547                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3548                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3549                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3550                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3551                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3552                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3553                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3554                 </fields>
3555                 <links>
3556                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3557                 </links>
3558         </class>
3559
3560         <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">
3561                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3562                         <field name="call_number" />
3563                         <field name="create_date" reporter:datatype="timestamp"/>
3564                         <field name="creator" reporter:datatype="link"/>
3565                         <field name="id" reporter:datatype="id" />
3566                         <field name="pub" reporter:datatype="bool"/>
3567                         <field name="title"  reporter:datatype="text"/>
3568                         <field name="value"  reporter:datatype="text"/>
3569                 </fields>
3570                 <links>
3571                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3572                 </links>
3573         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3574             <actions>
3575                 <create permission="CREATE_VOLUME_NOTE">
3576                     <context link="call_number" field="owning_lib"/>
3577                 </create>
3578                 <retrieve permission="VIEW_VOLUME_NOTES">
3579                     <context link="call_number" field="owning_lib"/>
3580                 </retrieve>
3581                 <update permission="UPDATE_VOLUME_NOTE">
3582                     <context link="call_number" field="owning_lib"/>
3583                 </update>
3584                 <delete permission="DELETE_VOLUME_NOTE">
3585                     <context link="call_number" field="owning_lib"/>
3586                 </delete>
3587             </actions>
3588         </permacrud>
3589         </class>
3590         <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">
3591                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3592                         <field name="create_date" reporter:datatype="timestamp"/>
3593                         <field name="creator" reporter:datatype="link"/>
3594                         <field name="edit_date" reporter:datatype="timestamp"/>
3595                         <field name="editor" reporter:datatype="link"/>
3596                         <field name="id" reporter:datatype="id" />
3597                         <field name="record" reporter:datatype="link"/>
3598                         <field name="value" reporter:datatype="text"/>
3599                 </fields>
3600                 <links>
3601                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3602                 </links>
3603         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3604             <actions>
3605                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3606                 <retrieve/>
3607                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3608                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3609             </actions>
3610         </permacrud>
3611         </class>
3612         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3613         <oils_persist:source_definition>
3614 SELECT  usr,
3615         SUM(
3616             CASE
3617                 WHEN (
3618                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3619                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3620                 ) THEN 1
3621                 ELSE 0
3622             END
3623         ) AS out,
3624
3625         SUM(
3626             CASE
3627                 WHEN (
3628                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3629                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3630                 ) THEN 1
3631                 ELSE 0
3632             END
3633         ) AS overdue,
3634
3635         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3636         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
3637         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3638   FROM  action.circulation
3639   WHERE checkin_time IS NULL
3640   GROUP BY 1
3641         </oils_persist:source_definition>
3642         <fields oils_persist:primary="usr">
3643             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3644             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3645             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3646             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3647             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3648             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3649         </fields>
3650         <links>
3651             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3652         </links>
3653         </class>
3654         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3655         <oils_persist:source_definition>
3656 SELECT  usr,
3657         ARRAY_TO_STRING(ARRAY_ACCUM(
3658             CASE
3659                 WHEN (
3660                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3661                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3662                 ) THEN id
3663                 ELSE 0
3664             END
3665         ),',') AS out,
3666
3667         ARRAY_TO_STRING(ARRAY_ACCUM(
3668             CASE
3669                 WHEN (
3670                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3671                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3672                 ) THEN id
3673                 ELSE 0
3674             END
3675         ),',') AS overdue,
3676
3677         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
3678         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
3679         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
3680   FROM  action.circulation
3681   WHERE checkin_time IS NULL
3682   GROUP BY 1
3683         </oils_persist:source_definition>
3684         <fields oils_persist:primary="usr">
3685             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3686             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3687             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3688             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3689             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3690             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3691         </fields>
3692         <links>
3693             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3694         </links>
3695         </class>
3696         <class id="circ" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
3697                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3698                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3699                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3700                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3701                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3702                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3703                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3704                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3705                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3706                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3707                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3708                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3709                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3710                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3711                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3712                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3713                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3714                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3715                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3716                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3717                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3718                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3719                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3720                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3721                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3722                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3723                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3724                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3725                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3726                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3727                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3728                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3729                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3730                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3731                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3732                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3733                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3734                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3735                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3736                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3737                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3738                 </fields>
3739                 <links>
3740                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3741                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3742                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3743                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3744                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3745                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3746                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3747                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3748                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3749                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3750                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3751                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3752                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3753                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3754                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3755                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3756                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3757                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3758                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3759                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3760                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3761                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3762                 </links>
3763                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3764                         <actions>
3765                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
3766                         </actions>
3767                 </permacrud>
3768         </class>
3769         <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">
3770                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3771                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3772                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3773                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3774                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3775                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3776                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3777                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3778                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3779                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3780                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3781                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3782                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3783                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3784                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3785                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3786                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3787                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3788                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3789                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3790                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3791                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3792                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3793                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3794                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3795                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3796                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3797                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3798                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3799                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3800                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3801                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3802                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3803                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3804                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3805                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3806                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3807                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3808                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3809                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3810                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3811                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3812                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3813                 </fields>
3814                 <links>
3815                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3816                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3817                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3818                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3819                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3820                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3821                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3822                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3823                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3824                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3825                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3826                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3827                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3828                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3829                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3830                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3831                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3832                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3833                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3834                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3835                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3836                 </links>
3837         </class>
3838         <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">
3839                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3840                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3841                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3842                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3843                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3844                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3845                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3846                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3847                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3848                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3849                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3850                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3851                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3852                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3853                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3854                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3855                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3856                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3857                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3858                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3859                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3860                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3861                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3862                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3863                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3864                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3865                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3866                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3867                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3868                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3869                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3870                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3871                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3872                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3873                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3874                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3875                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3876                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3877                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3878                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3879                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3880                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3881                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3882                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3883                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3884                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3885                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3886                 </fields>
3887                 <links>
3888                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3889                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3890                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3891                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3892                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3893                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3894                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3895                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3896                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3897                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3898                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3899                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3900                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3901                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3902                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3903                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3904                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3905                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3906                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3907                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3908                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3909                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3910                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3911                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3912                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3913                 </links>
3914         </class>
3915
3916         <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">
3917                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3918                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3919                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3920                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3921                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3922                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3923                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3924                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3925                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3926                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3927                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3928                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3929                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3930                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3931                 </fields>
3932                 <links>
3933                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3934                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3935                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3936                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3937                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3938                 </links>
3939                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3940                         <actions>
3941                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3942                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3943                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3944                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3945                         </actions>
3946                 </permacrud>
3947         </class>
3948
3949         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3950                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3951                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3952                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3953                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3954                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3955                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3956                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3957                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3958                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3959                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3960                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3961                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3962                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3963                 </fields>
3964                 <links>
3965                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3966                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3967                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3968                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3969                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3970                 </links>
3971                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3972                         <actions>
3973                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3974                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3975                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3976                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3977                         </actions>
3978                 </permacrud>
3979         </class>
3980         
3981         <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">
3982                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3983                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3984                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3985                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3986                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3987                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3988                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3989                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3990                 </fields>
3991                 <links>
3992                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3993                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3994                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3995                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3996                 </links>
3997                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3998                         <actions>
3999                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4000                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4001                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4002                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4003                         </actions>
4004                 </permacrud>
4005         </class>
4006         
4007         <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">
4008                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4009                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4010                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4011                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4012                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4013                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4014                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4015                 </fields>
4016                 <links>
4017                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4018                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4019                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4020                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4021                 </links>
4022                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4023                         <actions>
4024                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4025                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4026                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4027                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4028                         </actions>
4029                 </permacrud>
4030         </class>
4031         
4032         <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">
4033                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4034                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4035                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4036                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4037                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4038                 </fields>
4039                 <links>
4040                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4041                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4042                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4043                 </links>
4044                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4045                         <actions>
4046                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4047                     <context link="resource" field="owner" />
4048                 </create>
4049                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4050                     <context link="resource" field="owner" />
4051                 </retrieve>
4052                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4053                     <context link="resource" field="owner" />
4054                 </update>
4055                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4056                     <context link="resource" field="owner" />
4057                 </delete>
4058                         </actions>
4059                 </permacrud>
4060         </class>
4061         
4062         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4063                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4064                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4065                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4066                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4067                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4068                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4069                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4070                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4071                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4072                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4073                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4074                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4075                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4076                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4077                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4078                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4079                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4080                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4081                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4082                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4083                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4084                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4085                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4086                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4087                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4088                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4089                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4090                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4091                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4092                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4093                 </fields>
4094                 <links>
4095                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4096                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4097                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4098                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4099                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4100                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4101                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4102                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4103                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4104                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4105                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4106                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4107                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4108                 </links>
4109                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4110                         <actions>
4111                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4112                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4113                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4114                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4115                         </actions>
4116                 </permacrud>
4117         </class>
4118         
4119         <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">
4120                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4121                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4122                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4123                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4124                 </fields>
4125                 <links>
4126                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4127                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4128                 </links>
4129                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4130                         <actions>
4131                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4132                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4133                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4134                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4135                         </actions>
4136                 </permacrud>
4137         </class>
4138
4139         <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">
4140                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4141                         <field name="bucket" reporter:datatype="link"/>
4142                         <field name="id" reporter:datatype="id" />
4143                         <field name="target_call_number" reporter:datatype="link" />
4144                         <field name="create_time" reporter:datatype="timestamp" />
4145                         <field name="pos" reporter:datatype="int" />
4146                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4147                 </fields>
4148                 <links>
4149                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4150                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4151             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4152                 </links>
4153         </class>
4154         <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">
4155                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4156                         <field name="id" reporter:datatype="id" />
4157                         <field name="item" reporter:datatype="link"/>
4158                         <field name="note" reporter:datatype="text" />
4159                 </fields>
4160                 <links>
4161                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4162                 </links>
4163         </class>
4164         <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">
4165                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4166                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4167                         <field name="btype" reporter:datatype="text"/>
4168                         <field name="id" reporter:datatype="id" />
4169                         <field name="name" reporter:datatype="text"/>
4170                         <field name="description" reporter:datatype="text"/>
4171                         <field name="owner" reporter:datatype="link"/>
4172                         <field name="pub" reporter:datatype="bool"/>
4173                         <field name="create_time" reporter:datatype="timestamp" />
4174                 </fields>
4175                 <links>
4176                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4177                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4178                 </links>
4179         </class>
4180         <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">
4181                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4182                         <field name="id" reporter:datatype="id" />
4183                         <field name="bucket" reporter:datatype="link"/>
4184                         <field name="note" reporter:datatype="text" />
4185                 </fields>
4186                 <links>
4187                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4188                 </links>
4189         </class>
4190         <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">
4191                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4192                         <field name="hold" reporter:datatype="link"/>
4193                         <field name="id" reporter:datatype="id" />
4194                         <field name="target_copy" reporter:datatype="link"/>
4195                         <field name="proximity" reporter:datatype="number"/>
4196                 </fields>
4197                 <links>
4198                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4199                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4200                 </links>
4201         </class>
4202         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
4203                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4204                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4205                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4206                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4207                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4208                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4209                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4210                 </fields>
4211                 <links>
4212                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4213                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4214                 </links>
4215         </class>
4216         <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">
4217                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4218                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4219                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4220                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4221                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4222                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4223                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4224                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4225                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4226                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4227                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4228                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4229                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4230                 </fields>
4231                 <links>
4232                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4233                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4234                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4235                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4236                 </links>
4237         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4238             <actions>
4239                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4240                 <retrieve/>
4241                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4242                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4243             </actions>
4244         </permacrud>
4245         </class>
4246         <class id="acplg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location_group" oils_persist:tablename="asset.copy_location_group" reporter:label="Copy/Shelving Location Group">
4247                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4248                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4249                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4250                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4251                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4252             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4253             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4254             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4255                 </fields>
4256                 <links>
4257                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4258                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4259                 </links>
4260         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4261             <actions>
4262                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4263                 <retrieve/>
4264                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4265                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4266             </actions>
4267         </permacrud>
4268         </class>
4269         <class id="acplgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location_group_map" oils_persist:tablename="asset.copy_location_group_map" reporter:label="Copy/Shelving Location Group Map">
4270                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4271                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4272             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4273             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4274                 </fields>
4275                 <links>
4276                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4277                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4278                 </links>
4279         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4280             <actions>
4281                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4282                                         <context link="lgroup" field="owner" />
4283                 </create>
4284                 <retrieve/>
4285                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4286                                         <context link="lgroup" field="owner" />
4287                 </update>
4288                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4289                                         <context link="lgroup" field="owner" />
4290                 </delete>
4291             </actions>
4292         </permacrud>
4293         </class>
4294
4295     <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">
4296         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4297             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4298             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4299             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4300             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4301         </fields>
4302         <links>
4303             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4304             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4305         </links>
4306         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4307             <actions>
4308                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4309                 <retrieve/>
4310                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4311                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4312             </actions>
4313         </permacrud>
4314     </class>
4315
4316         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4317                 <fields>
4318                         <field name="sre_id" oils_persist:virtual="true" />
4319                         <field name="location" oils_persist:virtual="true" />
4320                         <field name="owning_lib" oils_persist:virtual="true" />
4321                         <field name="basic_holdings" oils_persist:virtual="true" />
4322                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4323                         <field name="supplement_holdings" oils_persist:virtual="true" />
4324                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4325                         <field name="index_holdings" oils_persist:virtual="true" />
4326                         <field name="index_holdings_add" oils_persist:virtual="true" />
4327                         <field name="online" oils_persist:virtual="true" />
4328                         <field name="missing" oils_persist:virtual="true" />
4329                         <field name="incomplete" oils_persist:virtual="true" />
4330                 </fields>
4331         </class>
4332
4333         <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">
4334                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4335                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4336                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4337                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4338                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4339                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4340                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4341                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4342                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4343                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4344                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4345                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4346                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4347                 </fields>
4348                 <links>
4349                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4350                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4351                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4352                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4353                 </links>
4354                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4355                         <actions>
4356                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4357                                 <retrieve/>
4358                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4359                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4360                         </actions>
4361                 </permacrud>
4362         </class>
4363
4364         <class id="scap" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::caption_and_pattern" oils_persist:tablename="serial.caption_and_pattern" reporter:label="Caption and Pattern">
4365                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4366                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4367                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4368                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4369                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4370                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4371                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4372                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4373                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4374                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4375                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4376                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4377                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4378                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4379                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4380                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4381                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4382                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4383                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4384                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4385                 </fields>
4386                 <links>
4387                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4388                 </links>
4389                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4390                         <actions>
4391                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4392                                         <context link="subscription" field="owning_lib" />
4393                                 </create>
4394                                 <retrieve />
4395                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4396                                         <context link="subscription" field="owning_lib" />
4397                                 </update>
4398                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4399                                         <context link="subscription" field="owning_lib" />
4400                                 </delete>
4401                         </actions>
4402                 </permacrud>
4403         </class>
4404
4405         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4406                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4407                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4408                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4409                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4410                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4411                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4412                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4413                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4414                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4415                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4416                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4417                 </fields>
4418                 <links>
4419                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4420                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4421                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4422                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4423                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4424                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4425                 </links>
4426                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4427                         <actions>
4428                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4429                                 <retrieve />
4430                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4431                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4432                         </actions>
4433                 </permacrud>
4434         </class>
4435
4436         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4437                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4438                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4439                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4440                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4441                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4442                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4443                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4444                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4445                 </fields>
4446                 <links>
4447                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4448                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4449                 </links>
4450         </class>
4451
4452         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4453                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4454                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4455                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4456                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4457                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4458                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4459                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4460                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4461                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4462                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4463                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4464                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4465                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4466                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4467                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4468                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4469                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4470                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4471                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4472                 </fields>
4473                 <links>
4474                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4475                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4476                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4477                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4478                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4479                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4480                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4481                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4482                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4483                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4484                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4485                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4486                 </links>
4487                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4488                         <actions>
4489                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4490                                 <retrieve />
4491                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4492                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4493                         </actions>
4494                 </permacrud>
4495         </class>
4496
4497         <class id="sdistn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution_note" oils_persist:tablename="serial.distribution_note" reporter:label="Distribution Note">
4498                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4499                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4500                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4501                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4502                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4503                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4504                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4505                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4506                 </fields>
4507                 <links>
4508                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4509                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4510                 </links>
4511                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4512                         <actions>
4513                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4514                                         <context link="distribution" field="holding_lib" />
4515                                 </create>
4516                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4517                                         <context link="distribution" field="holding_lib" />
4518                                 </retrieve>
4519                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4520                                         <context link="distribution" field="holding_lib" />
4521                                 </update>
4522                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4523                                         <context link="distribution" field="holding_lib" />
4524                                 </delete>
4525                         </actions>
4526                 </permacrud>
4527         </class>
4528
4529         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4530                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4531                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4532                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4533                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4534                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4535                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4536                 </fields>
4537                 <links>
4538                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4539                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4540                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4541                 </links>
4542                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4543                         <actions>
4544                                 <create permission="ADMIN_SERIAL_STREAM">
4545                                         <context link="distribution" field="holding_lib" />
4546                                 </create>
4547                                 <retrieve />
4548                                 <update permission="ADMIN_SERIAL_STREAM">
4549                                         <context link="distribution" field="holding_lib" />
4550                                 </update>
4551                                 <delete permission="ADMIN_SERIAL_STREAM">
4552                                         <context link="distribution" field="holding_lib" />
4553                                 </delete>
4554                         </actions>
4555                 </permacrud>
4556         </class>
4557
4558         <class id="srlu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::routing_list_user" oils_persist:tablename="serial.routing_list_user" reporter:label="Routing List User">
4559                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4560                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4561                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4562                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4563                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4564                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4565                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4566                 </fields>
4567                 <links>
4568                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4569                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4570                 </links>
4571                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4572                         <actions>
4573                                 <create permission="ADMIN_SERIAL_STREAM">
4574                                         <context link="stream" jump="distribution" field="holding_lib" />
4575                                 </create>
4576                                 <retrieve permission="RECEIVE_SERIAL">
4577                                         <context link="stream" jump="distribution" field="holding_lib" />
4578                                 </retrieve>
4579                                 <update permission="ADMIN_SERIAL_STREAM">
4580                                         <context link="stream" jump="distribution" field="holding_lib" />
4581                                 </update>
4582                                 <delete permission="ADMIN_SERIAL_STREAM">
4583                                         <context link="stream" jump="distribution" field="holding_lib" />
4584                                 </delete>
4585                         </actions>
4586                 </permacrud>
4587         </class>
4588
4589         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4590                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4591                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4592                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4593                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4594                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4595                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4596                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4597                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4598                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4599                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4600                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4601                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4602                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4603                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4604                 </fields>
4605                 <links>
4606                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4607                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4608                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4609                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4610                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4611                 </links>
4612                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4613                         <actions>
4614                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4615                                         <context link="subscription" field="owning_lib" />
4616                                 </create>
4617                                 <retrieve/>
4618                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4619                                         <context link="subscription" field="owning_lib" />
4620                                 </update>
4621                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4622                                         <context link="subscription" field="owning_lib" />
4623                                 </delete>
4624                         </actions>
4625                 </permacrud>
4626         </class>
4627
4628         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4629                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4630                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4631                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4632                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4633                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4634                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4635                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4636                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4637                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4638                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4639                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4640                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4641                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4642                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4643                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4644                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4645                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4646                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4647                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4648                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4649                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4650                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4651                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4652                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4653                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4654                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4655                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4656                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4657                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4658                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4659                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4660                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4661                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4662                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4663                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4664                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4665                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4666                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4667                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4668                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4669                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4670                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4671                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4672                 </fields>
4673                 <links>
4674                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4675                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4676                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4677                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4678                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4679                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4680                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4681                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4682                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4683                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4684                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4685                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4686                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4687                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4688                 </links>
4689                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4690                         <actions>
4691                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4692                                 <retrieve/>
4693                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4694                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4695                         </actions>
4696                 </permacrud>
4697         </class>
4698
4699         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4700                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4701                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4702                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4703                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4704                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4705                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4706                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4707                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4708                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4709                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4710                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4711                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4712                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4713                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4714                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4715                 </fields>
4716                 <links>
4717                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4718                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4719                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4720                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4721                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4722                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4723                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4724                 </links>
4725                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4726                         <actions>
4727                                 <create permission="ADMIN_SERIAL_ITEM">
4728                                         <context link="stream" jump="distribution" field="holding_lib" />
4729                                 </create>
4730                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4731                                         <context link="stream" jump="distribution" field="holding_lib" />
4732                                 </retrieve>
4733                                 <update permission="ADMIN_SERIAL_ITEM">
4734                                         <context link="stream" jump="distribution" field="holding_lib" />
4735                                 </update>
4736                                 <delete permission="ADMIN_SERIAL_ITEM">
4737                                         <context link="stream" jump="distribution" field="holding_lib" />
4738                                 </delete>
4739                         </actions>
4740                 </permacrud>
4741         </class>
4742
4743         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4744                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4745                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4746                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4747                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4748                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4749                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4750                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4751                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4752                 </fields>
4753                 <links>
4754                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4755                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4756                 </links>
4757                 <!-- Not available via PCRUD at this time -->
4758         </class>
4759         <class id="sasum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::any_summary" oils_persist:tablename="serial.any_summary" reporter:label="All Issues' Summaries" oils_persist:readonly="true">
4760                 <fields>
4761                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
4762                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
4763                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
4764                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
4765                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
4766                 </fields>
4767                 <links>
4768                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4769                 </links>
4770         </class>
4771         <class id="smhc" controller="open-ils.cstore" oils_obj:fieldmapper="serial::materialized_holding_code" oils_persist:tablename="serial.materialized_holding_code" reporter:label="Materialized Holding Code" oils_persist:readonly="true">
4772                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
4773                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4774                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
4775                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
4776                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
4777                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
4778                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
4779                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
4780                 </fields>
4781                 <links>
4782                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4783                 </links>
4784         </class>
4785         <class id="sbsum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::basic_summary" oils_persist:tablename="serial.basic_summary" reporter:label="Basic Issue Summary">
4786                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4787                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4788                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4789                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4790                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4791                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4792                 </fields>
4793                 <links>
4794                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4795                 </links>
4796                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4797                         <actions>
4798                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4799                                         <context link="distribution" field="holding_lib" />
4800                                 </create>
4801                                 <retrieve/>
4802                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4803                                         <context link="distribution" field="holding_lib" />
4804                                 </update>
4805                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4806                                         <context link="distribution" field="holding_lib" />
4807                                 </delete>
4808                         </actions>
4809                 </permacrud>
4810         </class>
4811
4812         <class id="sssum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::supplement_summary" oils_persist:tablename="serial.supplement_summary" reporter:label="Supplemental Issue Summary">
4813                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4814                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4815                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4816                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4817                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4818                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4819                 </fields>
4820                 <links>
4821                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4822                 </links>
4823                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4824                         <actions>
4825                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4826                                         <context link="distribution" field="holding_lib" />
4827                                 </create>
4828                                 <retrieve/>
4829                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4830                                         <context link="distribution" field="holding_lib" />
4831                                 </update>
4832                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4833                                         <context link="distribution" field="holding_lib" />
4834                                 </delete>
4835                         </actions>
4836                 </permacrud>
4837         </class>
4838
4839         <class id="sisum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::index_summary" oils_persist:tablename="serial.index_summary" reporter:label="Index Issue Summary">
4840                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4841                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4842                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4843                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4844                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4845                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4846                 </fields>
4847                 <links>
4848                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4849                 </links>
4850                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4851                         <actions>
4852                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4853                                         <context link="distribution" field="holding_lib" />
4854                                 </create>
4855                                 <retrieve/>
4856                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4857                                         <context link="distribution" field="holding_lib" />
4858                                 </update>
4859                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4860                                         <context link="distribution" field="holding_lib" />
4861                                 </delete>
4862                         </actions>
4863                 </permacrud>
4864         </class>
4865
4866         <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">
4867                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4868                         <field name="id" reporter:datatype="id" />
4869                         <field name="owning_copy" reporter:datatype="link"/>
4870                         <field name="stat_cat" reporter:datatype="link"/>
4871                         <field name="stat_cat_entry" reporter:datatype="link"/>
4872                 </fields>
4873                 <links>
4874                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4875                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4876                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4877                 </links>
4878         </class>
4879         <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">
4880                 <fields oils_persist:primary="code">
4881                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4882                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4883                 </fields>
4884                 <links/>
4885         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4886             <actions>
4887                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4888                 <retrieve/>
4889                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4890                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4891             </actions>
4892         </permacrud>
4893         </class>
4894         <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">
4895                 <fields oils_persist:primary="code">
4896                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4897                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4898                 </fields>
4899                 <links/>
4900         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4901             <actions>
4902                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4903                 <retrieve/>
4904                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4905                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4906             </actions>
4907         </permacrud>
4908         </class>
4909         <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">
4910                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4911                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4912                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4913                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4914                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4915                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4916                 </fields>
4917                 <links>
4918             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4919         </links>
4920         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4921             <actions>
4922                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4923                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4924                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4925                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4926             </actions>
4927         </permacrud>
4928         </class>
4929         <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">
4930                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4931                         <field name="id" reporter:datatype="id" />
4932                         <field name="name" reporter:datatype="text"/>
4933                 </fields>
4934                 <links/>
4935         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4936             <actions>
4937                 <create permission="CREATE_LASSO" global_required="true"/>
4938                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4939                 <update permission="UPDATE_LASSO" global_required="true"/>
4940                 <delete permission="DELETE_LASSO" global_required="true"/>
4941             </actions>
4942         </permacrud>
4943         </class>
4944         <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">
4945                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4946                         <field name="id" reporter:datatype="id" />
4947                         <field name="lasso" reporter:datatype="link"/>
4948                         <field name="org_unit" reporter:datatype="org_unit"/>
4949                 </fields>
4950                 <links>
4951                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4952                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4953                 </links>
4954         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4955             <actions>
4956                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4957                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4958                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4959                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4960             </actions>
4961         </permacrud>
4962         </class>
4963         <class id="aoupa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_proximity_adjustment" oils_persist:tablename="actor.org_unit_proximity_adjustment" reporter:label="Org Unit Proximity Adjustment">
4964                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
4965                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4966                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
4967                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
4968                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
4969                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
4970                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
4971                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
4972                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
4973                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
4974                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
4975                 </fields>
4976                 <links>
4977                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4978                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4979                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4980                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
4981                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
4982                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4983                 </links>
4984         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4985             <actions>
4986                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4987                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4988                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4989                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4990             </actions>
4991         </permacrud>
4992         </class>
4993         <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">
4994                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4995                         <field name="id" reporter:datatype="id" />
4996                         <field name="from_org" reporter:datatype="org_unit"/>
4997                         <field name="to_org" reporter:datatype="org_unit"/>
4998                         <field name="prox" reporter:datatype="int" />
4999                 </fields>
5000                 <links>
5001                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5002                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5003                 </links>
5004         </class>
5005         <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">
5006                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5007                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5008                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5009                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5010                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5011                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5012                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5013                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5014                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5015                 </fields>
5016                 <links/>
5017         </class>
5018         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5019                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5020                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5021                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5022                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5023                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5024                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5025                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5026                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5027                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5028                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5029                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5030                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5031                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5032                 </fields>
5033                 <links>
5034                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5035                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5036                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5037                 </links>
5038         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5039             <actions>
5040                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5041                 <retrieve/>
5042                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5043                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5044             </actions>
5045         </permacrud>
5046         </class>
5047         <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">
5048                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5049                         <field name="address_type"  reporter:datatype="text"/>
5050                         <field name="city"  reporter:datatype="text"/>
5051                         <field name="country"  reporter:datatype="text"/>
5052                         <field name="county"  reporter:datatype="text"/>
5053                         <field name="id" reporter:datatype="id" />
5054                         <field name="org_unit" reporter:datatype="org_unit"/>
5055                         <field name="post_code"  reporter:datatype="text"/>
5056                         <field name="state"  reporter:datatype="text"/>
5057                         <field name="street1"  reporter:datatype="text"/>
5058                         <field name="street2"  reporter:datatype="text"/>
5059                         <field name="valid" reporter:datatype="bool"/>
5060                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5061                 </fields>
5062                 <links>
5063                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5064                 </links>
5065         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5066             <actions>
5067                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5068                 <retrieve/>
5069                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5070                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5071             </actions>
5072         </permacrud>
5073         </class>
5074         <class id="asq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::search_query" oils_persist:tablename="actor.search_query" reporter:label="Search Query" oils_persist:field_safe="true">
5075                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5076                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5077                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5078                         <field name="query_text" reporter:datatype="text"/>
5079                 </fields>
5080         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5081             <actions>
5082                 <retrieve/>
5083             </actions>
5084         </permacrud>
5085         </class>
5086
5087         <class id="asfg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::search_filter_group" oils_persist:tablename="actor.search_filter_group" reporter:label="Search Filter Group" oils_persist:field_safe="true">
5088                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5089                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5090                         <field name="owner" reporter:datatype="org_unit"/>
5091                         <field name="code" reporter:datatype="text"/>
5092                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5093                         <field name="create_date" reporter:datatype="timestamp"/>
5094                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5095                 </fields>
5096                 <links>
5097                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5098                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5099                 </links>
5100         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5101             <actions>
5102                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5103                 <retrieve/>
5104                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5105                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5106             </actions>
5107         </permacrud>
5108         </class>
5109         <class id="asfge" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::search_filter_group_entry" oils_persist:tablename="actor.search_filter_group_entry" reporter:label="Search Filter Group Entry" oils_persist:field_safe="true">
5110                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5111                         <field name="id" reporter:datatype="id"/>
5112                         <field name="grp" reporter:datatype="link"/>
5113                         <field name="pos" reporter:datatype="int"/>
5114                         <field name="query" reporter:datatype="link"/>
5115                 </fields>
5116                 <links>
5117                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5118                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5119                 </links>
5120         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5121             <actions>
5122                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5123                     <context link="grp" field="owner"/>
5124                 </create>
5125                 <retrieve/>
5126                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5127                     <context link="grp" field="owner"/>
5128                 </update>
5129                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5130                     <context link="grp" field="owner"/>
5131                 </delete>
5132             </actions>
5133         </permacrud>
5134         </class>
5135
5136         <!-- A note: Please update alhr and ahopl when updating ahr -->
5137         <class id="ahr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_request" oils_persist:tablename="action.hold_request" reporter:core="true" reporter:label="Hold Request">
5138                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5139                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5140                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5141                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5142                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5143                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5144                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5145                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5146                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5147                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5148                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5149                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5150                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5151                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5152                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5153                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5154                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5155                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5156                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5157                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5158                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5159                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5160                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5161                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5162                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5163                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5164                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5165                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5166                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5167                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5168                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5169                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5170                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5171                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5172                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5173                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5174                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5175                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5176                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5177                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5178                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5179                 </fields>
5180                 <links>
5181                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5182                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5183                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5184                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5185                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5186                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5187                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5188                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5189                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5190                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5191                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5192                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5193                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5194                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5195                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5196                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5197                 </links>
5198                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5199                         <actions>
5200                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5201                         </actions>
5202                 </permacrud>
5203         </class>
5204         <class id="ahopl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_on_pull_list" reporter:label="Hold On Pull List" oils_persist:readonly="true">
5205                 <oils_persist:source_definition><![CDATA[
5206                 SELECT
5207                         ahr.*,
5208                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5209                                 copy_location_order_position,
5210                         CASE WHEN au.alias IS NOT NULL THEN
5211                                 au.alias
5212                         ELSE
5213                                 au.first_given_name
5214                         END AS usr_alias_or_first_given_name,
5215                         au.first_given_name AS usr_first_given_name,
5216                         au.second_given_name AS usr_second_given_name,
5217                         au.family_name AS usr_family_name,
5218                         au.prefix AS usr_prefix,
5219                         au.suffix AS usr_suffix,
5220                         au.alias AS usr_alias,
5221                         CASE WHEN au.alias IS NOT NULL THEN
5222                                 au.alias
5223                         ELSE
5224                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5225                                         COALESCE(au.family_name, ''),
5226                                         COALESCE(au.suffix, ''),
5227                                         ', ',
5228                                         COALESCE(au.prefix, ''),
5229                                         COALESCE(au.first_given_name, ''),
5230                                         COALESCE(au.second_given_name, '')
5231                                 ], ' '), E'\\s+,', ',')
5232                         END AS usr_alias_or_display_name,
5233                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5234                                 COALESCE(au.family_name, ''),
5235                                 COALESCE(au.suffix, ''),
5236                                 ', ',
5237                                 COALESCE(au.prefix, ''),
5238                                 COALESCE(au.first_given_name, ''),
5239                                 COALESCE(au.second_given_name, '')
5240                         ], ' '), E'\\s+,', ',') AS usr_display_name,
5241                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5242                                 AS call_number_label,
5243                         siss.label AS issuance_label,
5244                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5245                         ahcm_1.copy_count AS potential_copies
5246                 FROM action.hold_request ahr
5247                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5248                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5249                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5250                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5251                 JOIN actor.usr au ON (au.id = ahr.usr)
5252                 JOIN (
5253                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5254                         FROM asset.copy_location
5255                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5256                 LEFT JOIN actor.usr_standing_penalty ausp 
5257                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5258                 LEFT JOIN config.standing_penalty csp
5259                         ON (
5260                                 csp.id = ausp.standing_penalty AND 
5261                                 csp.block_list LIKE '%CAPTURE%' AND (
5262                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5263                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5264                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5265                                         )
5266                                 )
5267                         )
5268                 JOIN (
5269                         SELECT COUNT(target_copy) AS copy_count, hold
5270                         FROM action.hold_copy_map
5271                         GROUP BY 2
5272                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5273                 LEFT JOIN serial.issuance siss
5274                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5275                 LEFT JOIN asset.copy_location_order acplo
5276                         ON (acp.location = acplo.location AND
5277                                 acp.circ_lib = acplo.org)
5278                 WHERE
5279                         ahr.capture_time IS NULL AND
5280                         ahr.cancel_time IS NULL AND
5281                         csp.id IS NULL AND
5282                         (ahr.expire_time is NULL OR ahr.expire_time > NOW())
5283                 ]]></oils_persist:source_definition>
5284                 <fields oils_persist:primary="id">
5285                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5286                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5287                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5288                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5289                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5290                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5291                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5292                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5293                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5294                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5295                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5296                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5297                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5298                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5299                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5300                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5301                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5302                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5303                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5304                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5305                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5306                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5307                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5308                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5309                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5310                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5311                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5312                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5313                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5314                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5315                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5316                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5317                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5318                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5319                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5320                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5321                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5322                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5323                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5324                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5325                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5326                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
5327                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
5328                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
5329                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
5330                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
5331                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
5332                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5333                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
5334                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
5335                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5336                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5337                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5338                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5339                 </fields>
5340                 <links>
5341                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5342                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5343                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5344                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5345                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5346                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5347                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5348                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5349                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5350                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5351                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5352                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5353                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5354                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5355                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5356                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5357                 </links>
5358                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5359                         <actions>
5360                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5361                         </actions>
5362                 </permacrud>
5363         </class>
5364         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5365                 <oils_persist:source_definition>
5366                         SELECT ahr.* FROM action.hold_request ahr JOIN (SELECT current_copy, MAX(capture_time) AS capture_time FROM action.hold_request WHERE capture_time IS NOT NULL GROUP BY current_copy)x USING (current_copy, capture_time)
5367                 </oils_persist:source_definition>
5368                 <fields oils_persist:primary="id">
5369                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5370                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5371                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5372                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5373                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5374                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5375                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5376                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5377                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5378                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5379                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5380                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5381                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5382                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5383                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5384                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5385                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5386                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5387                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5388                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5389                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5390                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5391                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5392                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5393                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5394                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5395                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5396                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5397                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5398                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5399                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5400                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5401                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5402                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5403                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5404                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5405                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5406                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5407                 </fields>
5408                 <links>
5409                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5410                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5411                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5412                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5413                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5414                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5415                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5416                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5417                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5418                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5419                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5420                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5421                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5422                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5423                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5424                 </links>
5425         </class>
5426
5427         <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">
5428                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5429                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5430                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5431                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5432                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5433                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5434                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5435                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5436                 </fields>
5437                 <links>
5438                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5439                 </links>
5440                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5441                         <actions>
5442                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5443                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5444                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5445                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5446                         </actions>
5447                 </permacrud>
5448         </class>
5449         <class id="combahr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::all_hold_request" oils_persist:tablename="action.all_hold_request" reporter:core="true" reporter:label="Combined (Active &amp; Aged) Hold Request">
5450                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5451                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5452                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5453                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5454                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5455                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5456                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5457                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5458                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5459                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5460                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5461                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5462                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5463                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5464                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5465                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5466                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5467                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5468                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5469                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5470                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5471                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5472                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5473                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5474                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5475                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5476                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5477                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5478                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5479                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5480                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5481                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5482                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5483                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5484                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5485                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5486                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5487                 </fields>
5488                 <links>
5489                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5490                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5491                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5492                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5493                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5494                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5495                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5496                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5497                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5498                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5499                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5500                 </links>
5501                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5502                         <actions>
5503                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5504                         </actions>
5505                 </permacrud>
5506         </class>
5507         <class id="aahr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::aged_hold_request" oils_persist:tablename="action.aged_hold_request" reporter:core="true" reporter:label="Aged Hold Request">
5508                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5509                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5510                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5511                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5512                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5513                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5514                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5515                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5516                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5517                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5518                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5519                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5520                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5521                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5522                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5523                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5524                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5525                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5526                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5527                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5528                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5529                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5530                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5531                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5532                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5533                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5534                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5535                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5536                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5537                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5538                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5539                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5540                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5541                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5542                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5543                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5544                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5545                 </fields>
5546                 <links>
5547                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5548                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5549                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5550                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5551                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5552                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5553                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5554                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5555                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5556                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5557                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5558                 </links>
5559                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5560                         <actions>
5561                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5562                         </actions>
5563                 </permacrud>
5564         </class>
5565
5566         <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">
5567                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
5568                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
5569                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
5570                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
5571                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
5572                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
5573                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
5574                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5575                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
5576                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
5577                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
5578                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5579                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
5580                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5581                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
5582                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
5583                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
5584                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5585                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
5586                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
5587                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
5588                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
5589                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5590                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
5591                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
5592                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
5593                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
5594                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5595                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5596                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5597                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
5598                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
5599                 </fields>
5600                 <links>
5601                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
5602                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
5603                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
5604                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
5605                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
5606                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
5607                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5608                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
5609                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
5610                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
5611                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
5612                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
5613                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
5614                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
5615                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
5616                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
5617                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
5618                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
5619                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
5620                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
5621                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
5622                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
5623                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
5624                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
5625                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
5626                 </links>
5627         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5628             <actions>
5629                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
5630                 <retrieve />
5631                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
5632                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
5633             </actions>
5634         </permacrud>
5635         </class>
5636         <class id="aouct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_custom_tree" oils_persist:tablename="actor.org_unit_custom_tree" reporter:label="Org Unit Custom Tree">
5637                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
5638                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5639                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
5640                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
5641                 </fields>
5642                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5643                         <actions>
5644                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5645                                 <retrieve/>
5646                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5647                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5648                         </actions>
5649                 </permacrud>
5650         </class>
5651         <class id="aouctn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_custom_tree_node" oils_persist:tablename="actor.org_unit_custom_tree_node" reporter:label="Org Unit Custom Tree Node">
5652                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
5653                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5654                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
5655                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
5656                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
5657                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
5658                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
5659                 </fields>
5660                 <links>
5661                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
5662                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5663                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
5664                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
5665                 </links>
5666                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5667                         <actions>
5668                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5669                                 <retrieve/>
5670                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5671                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5672                         </actions>
5673                 </permacrud>
5674         </class>
5675         <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">
5676                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
5677                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5678                         <field name="btype" reporter:datatype="text"/>
5679                         <field name="id" reporter:datatype="id" />
5680                         <field name="name"  reporter:datatype="text"/>
5681                         <field name="description" reporter:datatype="text"/>
5682                         <field name="owner" reporter:datatype="link"/>
5683                         <field name="pub" reporter:datatype="bool"/>
5684                         <field name="create_time" reporter:datatype="timestamp" />
5685                 </fields>
5686                 <links>
5687                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5688                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
5689                 </links>
5690         </class>
5691         <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">
5692                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
5693                         <field name="id" reporter:datatype="id" />
5694                         <field name="bucket" reporter:datatype="link"/>
5695                         <field name="note" reporter:datatype="text" />
5696                 </fields>
5697                 <links>
5698                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5699                 </links>
5700         </class>
5701         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
5702                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
5703                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5704                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5705                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5706                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5707                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5708                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5709                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5710                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5711                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5712                 </fields>
5713                 <links>
5714                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5715                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
5716                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
5717                 </links>
5718         </class>
5719         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
5720                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
5721                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
5722                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5723                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
5724                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5725                 </fields>
5726                 <links>
5727                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5728                 </links>
5729                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5730                         <actions>
5731                                 <retrieve permission="VIEW_USER">
5732                                         <context link="usr" field="home_ou" />
5733                                 </retrieve>
5734                         </actions>
5735                 </permacrud>
5736         </class>
5737     <class id="actscsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::stat_cat_sip_fields" oils_persist:tablename="actor.stat_cat_sip_fields" reporter:label="SIP Statistical Category Field Identifier">
5738         <fields oils_persist:primary="field">
5739             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5740             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5741             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5742         </fields>
5743         <links/>
5744         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5745             <actions>
5746                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
5747                 <retrieve />
5748                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
5749                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
5750             </actions>
5751         </permacrud>
5752     </class>
5753         <class id="actsc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::stat_cat" oils_persist:tablename="actor.stat_cat" reporter:label="User Statistical Category">
5754                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
5755                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5756                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5757                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5758                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5759                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5760                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5761                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
5762                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5763                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5764                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5765                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5766                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
5767                 </fields>
5768                 <links>
5769                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5770                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
5771                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
5772                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
5773                 </links>
5774         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5775             <actions>
5776                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
5777                 <retrieve />
5778                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
5779                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
5780             </actions>
5781         </permacrud>
5782         </class>
5783         <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">
5784                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
5785                         <field name="field" reporter:datatype="link"/>
5786                         <field name="id" reporter:datatype="id" />
5787                         <field name="source" reporter:datatype="link"/>
5788                         <field name="value"  reporter:datatype="text"/>
5789                 </fields>
5790                 <links>
5791                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5792                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5793                 </links>
5794         </class>
5795         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
5796                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
5797                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5798                         <field name="btype" reporter:datatype="text"/>
5799                         <field name="id" reporter:datatype="id" />
5800                         <field name="name"  reporter:datatype="text"/>
5801                         <field name="description" reporter:datatype="text"/>
5802                         <field name="owner" reporter:datatype="link"/>
5803                         <field name="pub" reporter:datatype="bool"/>
5804                         <field name="create_time" reporter:datatype="timestamp" />
5805                 </fields>
5806                 <links>
5807                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5808                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
5809                 </links>
5810         </class>
5811         <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">
5812                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
5813                         <field name="id" reporter:datatype="id" />
5814                         <field name="bucket" reporter:datatype="link"/>
5815                         <field name="note" reporter:datatype="text" />
5816                 </fields>
5817                 <links>
5818                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5819                 </links>
5820         </class>
5821         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
5822                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5823                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5824                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5825                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5826                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
5827                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
5828                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5829                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5830                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
5831                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5832                 </fields>
5833                 <links>
5834                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5835                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5836                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5837                 </links>
5838         </class>
5839         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
5840                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
5841                         <field name="id" reporter:datatype="id" />
5842                         <field name="ind1" />
5843                         <field name="ind2" />
5844                         <field name="record" />
5845                         <field name="subfield" />
5846                         <field name="tag" />
5847                         <field name="value" />
5848                 </fields>
5849                 <links>
5850                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
5851                 </links>
5852         </class>
5853         <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">
5854                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
5855                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
5856                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5857                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
5858                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5859                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
5860                 </fields>
5861                 <links>
5862                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5863                 </links>
5864         </class>
5865         <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" oils_persist:field_safe="true">
5866                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
5867                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5868                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
5869                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
5870                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
5871                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5872                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5873                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
5874                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
5875                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
5876                 </fields>
5877                 <links>
5878                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
5879                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
5880                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
5881                 </links>
5882         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5883             <actions>
5884                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
5885                 <retrieve/>
5886                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
5887                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
5888             </actions>
5889         </permacrud>
5890         </class>
5891         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
5892                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
5893                         <field name="create_date" reporter:datatype="timestamp"/>
5894                         <field name="creator" reporter:datatype="link"/>
5895                         <field name="edit_date" reporter:datatype="timestamp"/>
5896                         <field name="editor" reporter:datatype="link"/>
5897                         <field name="id" reporter:datatype="id" />
5898                         <field name="pub" reporter:datatype="bool"/>
5899                         <field name="record" reporter:datatype="link"/>
5900                         <field name="value"  reporter:datatype="text"/>
5901                 </fields>
5902                 <links>
5903                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5904                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5905                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5906                 </links>
5907         </class>
5908         <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">
5909                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5910                         <field name="balance_owed" reporter:datatype="money" />
5911                         <field name="total_owed" reporter:datatype="money" />
5912                         <field name="total_paid" reporter:datatype="money" />
5913                         <field name="usr" reporter:datatype="link"/>
5914                 </fields>
5915                 <links>
5916                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5917                 </links>
5918         </class>
5919         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
5920                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5921                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
5922                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5923                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
5924                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5925                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
5926                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
5927                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5928                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5929                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5930                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5931                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5932                 </fields>
5933                 <links>
5934                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5935                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5936                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5937                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5938                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
5939                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5940                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5941                 </links>
5942         </class>
5943         <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">
5944                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
5945                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
5946                         <field name="quality" reporter:datatype="int" />
5947                         <field name="source" reporter:datatype="text"/>
5948                         <field name="transcendant" reporter:datatype="bool"/>
5949                         <field name="can_have_copies" reporter:datatype="bool"/>
5950                 </fields>
5951                 <links/>
5952         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5953             <actions>
5954                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
5955                 <retrieve/>
5956                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
5957                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
5958             </actions>
5959         </permacrud>
5960         </class>
5961         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
5962                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5963                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5964                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5965                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5966                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5967                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5968                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
5969                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5970                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5971                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5972                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5973                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5974                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5975                 </fields>
5976                 <links>
5977                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
5978                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5979                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5980                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5981                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5982                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5983                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5984                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5985                 </links>
5986         </class>
5987         <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">
5988                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
5989                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5990                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5991                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5992                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
5993                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5994                 </fields>
5995                 <links>
5996                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5997                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5998                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
5999                 </links>
6000         </class>
6001         <class id="actsced" controller="open-ils.cstore" oils_obj:fieldmapper="actor::stat_cat_entry_default" oils_persist:tablename="actor.stat_cat_entry_default" reporter:label="User Stat Cat Default Entry">
6002                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6003                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6004                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6005                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6006                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6007                 </fields>
6008                 <links>
6009                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6010                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6011                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6012                 </links>
6013         </class>
6014         <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">
6015                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6016                         <field name="bucket" reporter:datatype="link"/>
6017                         <field name="id" reporter:datatype="id" />
6018                         <field name="target_user" reporter:datatype="link"/>
6019                         <field name="create_time" reporter:datatype="timestamp" />
6020                         <field name="pos" reporter:datatype="int" />
6021                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6022                 </fields>
6023                 <links>
6024                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6025                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6026             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6027                 </links>
6028         </class>
6029         <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">
6030                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6031                         <field name="id" reporter:datatype="id" />
6032                         <field name="item" reporter:datatype="link"/>
6033                         <field name="note" reporter:datatype="text" />
6034                 </fields>
6035                 <links>
6036                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6037                 </links>
6038         </class>
6039         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6040                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6041                         <field name="balance_owed" reporter:datatype="money" />
6042                         <field name="total_owed" reporter:datatype="money" />
6043                         <field name="total_paid" reporter:datatype="money" />
6044                         <field name="usr" reporter:datatype="link"/>
6045                 </fields>
6046                 <links>
6047                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6048                 </links>
6049         </class>
6050         <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">
6051                 <fields oils_persist:primary="code" oils_persist:sequence="">
6052                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6053                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6054                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6055                 </fields>
6056                 <links/>
6057         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6058             <actions>
6059                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6060                 <retrieve/>
6061                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6062                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6063             </actions>
6064         </permacrud>
6065         </class>
6066         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
6067                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6068                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6069                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6070                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6071                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6072                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6073                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6074                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6075                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6076                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6077                 </fields>
6078                 <links>
6079                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6080                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6081                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6082                 </links>
6083         </class>
6084         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
6085                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6086                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6087                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6088                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6089                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6090                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6091                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6092                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6093                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6094                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6095                 </fields>
6096                 <links>
6097                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6098                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6099                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6100                 </links>
6101         </class>
6102         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
6103                 <fields oils_persist:primary="id" oils_persist:sequence="">
6104                         <field name="checkin_lib" reporter:datatype="link"/>
6105                         <field name="checkin_staff" reporter:datatype="link"/>
6106                         <field name="checkin_time" reporter:datatype="timestamp"/>
6107                         <field name="circ_lib"  reporter:datatype="org_unit"/>
6108                         <field name="circ_staff" reporter:datatype="link"/>
6109                         <field name="desk_renewal" reporter:datatype="bool"/>
6110                         <field name="due_date" reporter:datatype="timestamp"/>
6111                         <field name="duration" reporter:datatype="interval"/>
6112                         <field name="duration_rule" reporter:datatype="link"/>
6113                         <field name="fine_interval" reporter:datatype="interval"/>
6114                         <field name="id" reporter:datatype="id" />
6115                         <field name="max_fine" reporter:datatype="money" />
6116                         <field name="max_fine_rule" reporter:datatype="link"/>
6117                         <field name="opac_renewal" reporter:datatype="bool"/>
6118                         <field name="phone_renewal" reporter:datatype="bool"/>
6119                         <field name="recurring_fine" reporter:datatype="money" />
6120                         <field name="recurring_fine_rule" reporter:datatype="link"/>
6121                         <field name="renewal_remaining" reporter:datatype="int" />
6122             <field name="grace_period" reporter:datatype="interval" />
6123                         <field name="stop_fines" reporter:datatype="text"/>
6124                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
6125                         <field name="target_copy" reporter:datatype="link"/>
6126                         <field name="usr" reporter:datatype="link"/>
6127                         <field name="xact_finish" reporter:datatype="timestamp" />
6128                         <field name="xact_start" reporter:datatype="timestamp" />
6129                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6130                 </fields>
6131                 <links>
6132                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6133                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6134                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6135                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6136                 </links>
6137         </class>
6138         <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">
6139                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
6140                         <field name="field" reporter:datatype="link"/>
6141                         <field name="id" reporter:datatype="id" />
6142                         <field name="source" reporter:datatype="link"/>
6143                         <field name="value" reporter:datatype="text"/>
6144                 </fields>
6145                 <links>
6146                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6147                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6148                 </links>
6149         </class>
6150         <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">
6151                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6152                         <field name="high" reporter:datatype="money" />
6153                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6154                         <field name="low" reporter:datatype="money" />
6155                         <field name="name" reporter:datatype="text"/>
6156                         <field name="normal" reporter:datatype="money" />
6157                         <field name="recurrence_interval" reporter:datatype="interval"/>
6158             <field name="grace_period" reporter:datatype="interval" />
6159                 </fields>
6160                 <links/>
6161         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6162             <actions>
6163                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6164                 <retrieve/>
6165                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6166                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6167             </actions>
6168         </permacrud>
6169         </class>
6170         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
6171                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6172                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6173                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6174                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6175                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6176                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6177                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6178                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6179                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6180                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6181                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6182                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6183                 </fields>
6184                 <links>
6185                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6186                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6187                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6188                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6189                 </links>
6190         </class>
6191         <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">
6192                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6193                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6194                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6195                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6196                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6197                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6198                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6199                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6200                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6201                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6202                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6203                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6204                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6205                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6206                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6207                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6208                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6209                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6210                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6211                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6212                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6213                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6214                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6215                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6216                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6217                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6218                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6219                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6220                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6221                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6222                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6223                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6224                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
6225                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6226                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6227                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6228                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6229                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6230                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6231                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6232                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6233                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6234                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6235                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6236                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6237                 </fields>
6238                 <links>
6239                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6240                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6241                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6242                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6243                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6244                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6245                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6246                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6247                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6248                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6249                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6250                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6251                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6252                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6253                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6254                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6255                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6256                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6257                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6258                 </links>
6259         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6260             <actions>
6261                 <create permission="CREATE_COPY">
6262                     <context link="call_number" field="owning_lib"/>
6263                 </create>
6264                 <retrieve/>
6265                 <update permission="UPDATE_COPY">
6266                     <context link="call_number" field="owning_lib"/>
6267                 </update>
6268                 <delete permission="DELETE_COPY">
6269                     <context link="call_number" field="owning_lib"/>
6270                 </delete>
6271             </actions>
6272         </permacrud>
6273         </class>
6274
6275         <class id="act" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_template" oils_persist:tablename="asset.copy_template" reporter:label="Asset Copy Template">
6276                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6277                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6278                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6279                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6280                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6281                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6282                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6283                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6284                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6285                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6286                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6287                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6288                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6289                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6290                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6291                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6292                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6293                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6294                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6295                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6296                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6297                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6298                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6299                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6300                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
6301                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6302                 </fields>
6303                 <links>
6304                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6305                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6306                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6307                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6308                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6309                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6310                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6311                 </links>
6312                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6313                         <actions>
6314                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6315                                 <retrieve />
6316                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6317                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6318                         </actions>
6319                 </permacrud>
6320         </class>
6321
6322         <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" oils_persist:field_safe="true">
6323                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6324                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6325                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6326                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6327                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6328                 </fields>
6329                 <links/>
6330         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6331             <actions>
6332                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6333                 <retrieve/>
6334                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6335                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6336             </actions>
6337         </permacrud>
6338         </class>
6339         <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">
6340                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6341                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6342                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6343                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6344                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6345                 </fields>
6346                 <links/>
6347         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6348             <actions>
6349                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6350                 <retrieve/>
6351                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6352                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6353             </actions>
6354         </permacrud>
6355         </class>
6356         <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">
6357                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6358                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6359                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6360                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6361                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6362                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6363                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6364                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6365                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6366                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6367                 </fields>
6368                 <links>
6369                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6370                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6371                 </links>
6372         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6373             <actions>
6374                 <create permission="CREATE_PERM" global_required="true"/>
6375                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6376                 <update permission="UPDATE_PERM" global_required="true"/>
6377                 <delete permission="DELETE_PERM" global_required="true"/>
6378             </actions>
6379         </permacrud>
6380         </class>
6381         <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">
6382                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6383                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6384                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6385                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6386                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6387                 </fields>
6388                 <links>
6389                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6390                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6391                 </links>
6392         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6393             <actions>
6394                 <create permission="ADMIN_SURVEY">
6395                     <context link="question" jump="survey" field="owner"/>
6396                 </create>
6397                 <retrieve/>
6398                 <update permission="ADMIN_SURVEY">
6399                     <context link="question" jump="survey" field="owner"/>
6400                 </update>
6401                 <delete permission="ADMIN_SURVEY">
6402                     <context link="question" jump="survey" field="owner"/>
6403                 </delete>
6404             </actions>
6405         </permacrud>
6406         </class>
6407         <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">
6408                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6409                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6410                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6411                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6412                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6413                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6414                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6415                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6416                 </fields>
6417                 <links>
6418                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6419                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6420                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6421                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6422                 </links>
6423         </class>
6424         <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">
6425                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6426                         <field name="balance_owed" reporter:datatype="money" />
6427                         <field name="total_owed" reporter:datatype="money" />
6428                         <field name="total_paid" reporter:datatype="money" />
6429                         <field name="usr" reporter:datatype="link"/>
6430                 </fields>
6431                 <links>
6432                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6433                 </links>
6434         </class>
6435         <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">
6436                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
6437                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
6438                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
6439                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
6440                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
6441                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6442                 </fields>
6443                 <links>
6444                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6445                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6446                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6447                 </links>
6448         </class>
6449         <class id="mife" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::identifier_field_entry" oils_persist:tablename="metabib.identifier_field_entry" reporter:label="Identifier Field Entry">
6450                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
6451                         <field name="field" reporter:datatype="link"/>
6452                         <field name="id" reporter:datatype="id" />
6453                         <field name="source" reporter:datatype="link"/>
6454                         <field name="value" reporter:datatype="text"/>
6455                 </fields>
6456                 <links>
6457                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6458                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6459                 </links>
6460         </class>
6461         <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">
6462                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
6463                         <field name="field" reporter:datatype="link"/>
6464                         <field name="id" reporter:datatype="id" />
6465                         <field name="source" reporter:datatype="link"/>
6466                         <field name="value" reporter:datatype="text"/>
6467                 </fields>
6468                 <links>
6469                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6470                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6471                 </links>
6472         </class>
6473         <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">
6474                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
6475                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6476                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
6477                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
6478                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
6479                 </fields>
6480                 <links>
6481                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
6482                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6483                 </links>
6484         </class>
6485         <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">
6486                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
6487                         <field name="depth" reporter:datatype="int" />
6488                         <field name="grantable" reporter:datatype="bool"/>
6489                         <field name="grp" reporter:datatype="link"/>
6490                         <field name="id" reporter:datatype="id" />
6491                         <field name="perm" reporter:datatype="link"/>
6492                 </fields>
6493                 <links>
6494                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6495                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6496                 </links>
6497         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6498             <actions>
6499                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
6500                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
6501                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
6502                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
6503             </actions>
6504         </permacrud>
6505         </class>
6506         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
6507                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
6508                         <field name="items" oils_persist:virtual="true" />
6509                         <field name="btype" reporter:datatype="text"/>
6510                         <field name="id" reporter:datatype="id" />
6511                         <field name="name" reporter:datatype="text"/>
6512                         <field name="description" reporter:datatype="text"/>
6513                         <field name="owner" reporter:datatype="link"/>
6514                         <field name="pub" reporter:datatype="bool"/>
6515                         <field name="create_time" reporter:datatype="timestamp" />
6516                 </fields>
6517                 <links>
6518                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6519                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
6520                 </links>
6521         </class>
6522         <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">
6523                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
6524                         <field name="id" reporter:datatype="id" />
6525                         <field name="bucket" reporter:datatype="link"/>
6526                         <field name="note" reporter:datatype="text" />
6527                 </fields>
6528                 <links>
6529                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
6530                 </links>
6531         </class>
6532         <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">
6533                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
6534                         <field name="id" reporter:datatype="int" />
6535                         <field name="usr" reporter:datatype="link"/>
6536                         <field name="work_ou" reporter:datatype="link"/>
6537                 </fields>
6538                 <links>
6539                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6540                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
6541                 </links>
6542         </class>
6543         <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">
6544                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
6545                         <field name="depth" reporter:datatype="int"/>
6546                         <field name="grantable" reporter:datatype="bool"/>
6547                         <field name="id" reporter:datatype="id" />
6548                         <field name="perm" reporter:datatype="link"/>
6549                         <field name="usr" reporter:datatype="link"/>
6550                 </fields>
6551                 <links>
6552                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6553                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6554                 </links>
6555         </class>
6556         <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">
6557                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
6558                         <field name="object_id" reporter:datatype="text"/>
6559                         <field name="grantable" reporter:datatype="bool"/>
6560                         <field name="id" reporter:datatype="id" />
6561                         <field name="perm" reporter:datatype="link"/>
6562                         <field name="usr" reporter:datatype="link"/>
6563                         <field name="object_type" reporter:datatype="text"/>
6564                 </fields>
6565                 <links>
6566                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6567                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6568                 </links>
6569         </class>
6570         <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">
6571                 <fields oils_persist:primary="id" oils_persist:sequence="">
6572                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6573                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6574                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6575                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6576                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6577                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6578                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6579                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6580                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6581                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6582                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6583                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6584                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6585                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6586                 </fields>
6587                 <links>
6588                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6589                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6590                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6591                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6592                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6593                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6594                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6595                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6596                 </links>
6597         </class>
6598         <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">
6599                 <fields oils_persist:primary="id" oils_persist:sequence="">
6600                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6601                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6602                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6603                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6604                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6605                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6606                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
6607                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6608                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6609                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6610                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6611                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6612                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6613                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6614                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6615                 </fields>
6616                 <links>
6617                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6618                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6619                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6620                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6621                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6622                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6623                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6624                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6625                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6626                 </links>
6627         </class>
6628         <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">
6629                 <fields oils_persist:primary="id" oils_persist:sequence="">
6630                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6631                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6632                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6633                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6634                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6635                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6636                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6637                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6638                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6639                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6640                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6641                 </fields>
6642                 <links>
6643                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6644                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6645                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6646                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6647                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6648                 </links>
6649         </class>
6650         <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">
6651                 <fields oils_persist:primary="id" oils_persist:sequence="">
6652                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6653                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6654                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6655                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6656                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6657                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6658                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
6659                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
6660                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6661                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6662                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6663                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6664                 </fields>
6665                 <links>
6666                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6667                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6668                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6669                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6670                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6671                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6672                 </links>
6673         </class>
6674         <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">
6675                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
6676                         <field name="bucket" reporter:datatype="link"/>
6677                         <field name="id" reporter:datatype="id" />
6678                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
6679                         <field name="create_time" reporter:datatype="timestamp" />
6680                         <field name="pos" reporter:datatype="int" />
6681                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6682                 </fields>
6683                 <links>
6684                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
6685                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
6686             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
6687                 </links>
6688         </class>
6689         <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">
6690                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
6691                         <field name="id" reporter:datatype="id" />
6692                         <field name="item" reporter:datatype="link"/>
6693                         <field name="note" reporter:datatype="text" />
6694                 </fields>
6695                 <links>
6696                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
6697                 </links>
6698         </class>
6699         <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">
6700                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
6701                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
6702                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6703                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6704                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6705                 </fields>
6706                 <links>
6707                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6708                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6709                 </links>
6710         </class>
6711     <class id="ascsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::stat_cat_sip_fields" oils_persist:tablename="asset.stat_cat_sip_fields" reporter:label="SIP Statistical Category Field Identifier">
6712         <fields oils_persist:primary="field">
6713             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6714             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6715             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6716         </fields>
6717         <links/>
6718         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6719             <actions>
6720                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
6721                 <retrieve />
6722                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
6723                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
6724             </actions>
6725         </permacrud>
6726     </class>
6727         <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">
6728                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
6729                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
6730                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6731                 </fields>
6732                 <links/>
6733         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6734             <actions>
6735                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6736                 <retrieve/>
6737                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6738                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6739             </actions>
6740         </permacrud>
6741         </class>
6742
6743
6744         <class id="artc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::reservation_transit_copy" oils_persist:tablename="action.reservation_transit_copy" reporter:core="true" reporter:label="Reservation Transit">
6745                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6746                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6747                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6748                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6749                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
6750                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6751                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6752                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6753                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6754                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6755                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6756                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6757                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6758                 </fields>
6759                 <links>
6760                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6761                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
6762                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6763                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6764                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6765                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6766                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
6767                 </links>
6768         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6769             <actions>
6770                 <create permission="TRANSIT_COPY">
6771                     <context link="target_copy" field="owner"/>
6772                 </create>
6773                 <retrieve/>
6774                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6775                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6776             </actions>
6777         </permacrud>
6778         </class>
6779         <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">
6780                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6781                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6782                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6783                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6784                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
6785                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6786                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6787                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6788                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6789                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6790                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6791                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6792                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6793                 </fields>
6794                 <links>
6795                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6796                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6797                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6798                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6799                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6800                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6801                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6802                 </links>
6803         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6804             <actions>
6805                 <create permission="TRANSIT_COPY" context_field="owner">
6806                     <context link="target_copy" field="circ_lib"/>
6807                 </create>
6808                 <retrieve/>
6809                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6810                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6811             </actions>
6812         </permacrud>
6813         </class>
6814         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
6815                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
6816                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6817                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
6818                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
6819                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
6820                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6821                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
6822                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6823                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
6824                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6825                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
6826                 </fields>
6827                 <links>
6828                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6829                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
6830                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
6831                 </links>
6832         </class>
6833         <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">
6834                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
6835                         <field name="grp" />
6836                         <field name="id" reporter:datatype="id" />
6837                         <field name="usr" />
6838                 </fields>
6839                 <links>
6840                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6841                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6842                 </links>
6843         </class>
6844         <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">
6845                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
6846                         <field name="id" reporter:datatype="id" />
6847                         <field name="fq_field" reporter:datatype="text"/>
6848                         <field name="identity_value" reporter:datatype="text"/>
6849                         <field name="translation" reporter:datatype="text"/>
6850                         <field name="string" reporter:datatype="text"/>
6851                 </fields>
6852                 <links>
6853                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
6854                 </links>
6855         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6856             <actions>
6857                 <create permission="CREATE_TRANSLATION" global_required="true"/>
6858                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
6859                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
6860                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
6861             </actions>
6862         </permacrud>
6863         </class>
6864         <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">
6865                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
6866                         <field name="id" reporter:datatype="id" />
6867                         <field name="fm_class" reporter:datatype="text"/>
6868                         <field name="field" reporter:datatype="text"/>
6869                         <field name="owner" reporter:datatype="org_unit"/>
6870                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
6871                 </fields>
6872                 <links>
6873                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6874                 </links>
6875         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6876             <actions>
6877                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6878                 <retrieve/>
6879                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6880                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6881             </actions>
6882         </permacrud>
6883         </class>
6884         <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">
6885                 <fields oils_persist:primary="code">
6886                         <field name="code" reporter:datatype="id" />
6887                         <field name="marc_code" reporter:datatype="text"/>
6888                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6889                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6890                 </fields>
6891                 <links/>
6892         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6893             <actions>
6894                 <create permission="CREATE_LOCALE" global_required="true"/>
6895                 <retrieve/>
6896                 <update permission="UPDATE_LOCALE" global_required="true"/>
6897                 <delete permission="DELETE_LOCALE" global_required="true"/>
6898             </actions>
6899         </permacrud>
6900         </class>
6901         <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">
6902                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
6903                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
6904                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
6905                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
6906             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
6907                 </fields>
6908                 <links>
6909                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6910                 </links>
6911         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6912             <actions>
6913                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
6914                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
6915                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
6916                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
6917             </actions>
6918         </permacrud>
6919         </class>
6920
6921         <class id="aurt" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::user_request_type" oils_persist:tablename="acq.user_request_type" reporter:label="User Purchase Request Type">
6922                 <fields oils_persist:primary="id">
6923                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6924                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6925                 </fields>
6926                 <links/>
6927         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6928             <actions>
6929                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6930                 <retrieve/>
6931                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6932                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6933             </actions>
6934         </permacrud>
6935         </class>
6936
6937         <class id="aur" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::user_request" oils_persist:tablename="acq.user_request" reporter:label="User Purchase Request">
6938                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
6939                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6940                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6941                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
6942                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
6943                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
6944                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
6945                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
6946                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
6947                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6948                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
6949                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
6950                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
6951                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
6952                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
6953                         <field reporter:label="Title" name="title" reporter:datatype="text" />
6954                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
6955                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6956                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
6957                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
6958                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
6959                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
6960                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
6961                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
6962                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
6963                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6964                 </fields>
6965                 <links>
6966                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6967                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6968                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6969                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
6970                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
6971                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6972                 </links>
6973         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6974             <actions>
6975                 <create permission="user_request.create">
6976                     <context link="usr" field="home_ou"/>
6977                                 </create>
6978                 <retrieve permission="user_request.view">
6979                     <context link="usr" field="home_ou"/>
6980                                 </retrieve>
6981                 <update permission="user_request.update">
6982                     <context link="usr" field="home_ou"/>
6983                                 </update>
6984                 <delete permission="user_request.delete">
6985                     <context link="usr" field="home_ou"/>
6986                                 </delete>
6987             </actions>
6988         </permacrud>
6989         </class>
6990
6991         <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">
6992                 <fields oils_persist:primary="code">
6993                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
6994                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6995                 </fields>
6996                 <links/>
6997         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6998             <actions>
6999                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7000                 <retrieve/>
7001                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7002                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7003             </actions>
7004         </permacrud>
7005         </class>
7006
7007         <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">
7008                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
7009                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
7010                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
7011                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
7012                         <field reporter:label="Ratio" name="ratio" />
7013                 </fields>
7014                 <links>
7015                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
7016                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
7017                 </links>
7018                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7019                         <actions>
7020                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7021                                 <retrieve/>
7022                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7023                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7024                         </actions>
7025                 </permacrud>
7026         </class>
7027
7028         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
7029                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
7030                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7031                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7032                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7033                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7034                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7035                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
7036                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
7037                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
7038                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
7039                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7040                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7041                         <field reporter:label="URL" name="url" reporter:datatype="text" />
7042                         <field reporter:label="Email" name="email" reporter:datatype="text" />
7043                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
7044                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
7045                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
7046                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
7047                 </fields>
7048                 <links>
7049                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7050                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7051             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
7052             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
7053             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
7054                 </links>
7055         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7056             <actions>
7057                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
7058                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
7059                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
7060                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
7061             </actions>
7062         </permacrud>
7063         </class>
7064
7065         <class id="acqpron" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::provider_note" oils_persist:tablename="acq.provider_note" reporter:label="Provider Note">
7066                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
7067                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7068                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7069                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7070                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7071                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7072                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7073                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7074                 </fields>
7075                 <links>
7076                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7077                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7078                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7079                 </links>
7080         </class>
7081
7082         <class id="acqipm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_payment_method" oils_persist:tablename="acq.invoice_payment_method" reporter:label="Invoice Payment Method">
7083                 <fields oils_persist:primary="code">
7084                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
7085                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7086                 </fields>
7087                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7088             <actions>
7089                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7090                 <retrieve/>
7091                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7092                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7093             </actions>
7094                 </permacrud>
7095         </class>
7096
7097         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
7098                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
7099                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
7100                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
7101                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7102                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
7103                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
7104                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
7105                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
7106                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
7107                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
7108                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
7109                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7110                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
7111                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
7112                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
7113                 </fields>
7114                 <links>
7115                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
7116                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7117                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
7118                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
7119                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
7120                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
7121                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
7122                 </links>
7123         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7124             <actions>
7125                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
7126                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
7127                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
7128                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
7129             </actions>
7130         </permacrud>
7131         </class>
7132
7133         <class id="acqie" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_entry" oils_persist:tablename="acq.invoice_entry" reporter:label="Invoice Entry">
7134                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
7135                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7136                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7137                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7138                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
7139                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
7140                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
7141                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7142                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
7143                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7144                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7145                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7146                 </fields>
7147                 <links>
7148                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7149                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7150                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7151                 </links>
7152         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7153             <actions>
7154                 <create   permission="ADMIN_INVOICE">
7155                                         <context link="invoice" field="receiver"/>
7156                                 </create>
7157                 <retrieve permission="ADMIN_INVOICE">
7158                                         <context link="invoice" field="receiver"/>
7159                                 </retrieve>
7160                 <update   permission="ADMIN_INVOICE">
7161                                         <context link="invoice" field="receiver"/>
7162                                 </update>
7163                                 <delete   permission="ADMIN_INVOICE">
7164                                         <context link="invoice" field="receiver"/>
7165                                 </delete>
7166             </actions>
7167         </permacrud>
7168         </class>
7169
7170         <class id="acqii" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_item" oils_persist:tablename="acq.invoice_item" reporter:label="Non-bibliographic Invoice Item">
7171                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
7172                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7173                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7174                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7175                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7176                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7177                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7178                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7179                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7180                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7181                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7182                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7183                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7184                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7185                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7186                 </fields>
7187                 <links>
7188                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7189                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7190                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7191                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7192                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7193                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
7194                 </links>
7195         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7196             <actions>
7197                 <create   permission="ADMIN_INVOICE">
7198                                         <context link="invoice" field="receiver"/>
7199                                 </create>
7200                 <retrieve permission="ADMIN_INVOICE">
7201                                         <context link="invoice" field="receiver"/>
7202                                 </retrieve>
7203                 <update   permission="ADMIN_INVOICE">
7204                                         <context link="invoice" field="receiver"/>
7205                                 </update>
7206                                 <delete   permission="ADMIN_INVOICE">
7207                                         <context link="invoice" field="receiver"/>
7208                                 </delete>
7209             </actions>
7210         </permacrud>
7211         </class>
7212
7213         <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">
7214                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7215                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7216                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7217                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7218                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7219                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7220                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7221                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7222                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7223                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7224                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7225                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7226                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7227                 </fields>
7228                 <links>
7229                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7230                 </links>
7231         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7232             <actions>
7233                 <create permission="ADMIN_PROVIDER">
7234                     <context link="provider" field="owner"/>
7235                 </create>
7236                 <retrieve permission="ADMIN_PROVIDER">
7237                     <context link="provider" field="owner"/>
7238                 </retrieve>
7239                 <update permission="ADMIN_PROVIDER">
7240                     <context link="provider" field="owner"/>
7241                 </update>
7242                 <delete permission="ADMIN_PROVIDER">
7243                     <context link="provider" field="owner"/>
7244                 </delete>
7245             </actions>
7246         </permacrud>
7247         </class>
7248
7249         <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">
7250                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7251                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7252                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7253                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7254                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7255                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7256                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7257         </fields>
7258                 <links>
7259                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7260                 </links>
7261         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7262             <actions>
7263                 <create permission="ADMIN_PROVIDER">
7264                     <context link="provider" field="owner"/>
7265                 </create>
7266                 <retrieve permission="ADMIN_PROVIDER">
7267                     <context link="provider" field="owner"/>
7268                 </retrieve>
7269                 <update permission="ADMIN_PROVIDER">
7270                     <context link="provider" field="owner"/>
7271                 </update>
7272                 <delete permission="ADMIN_PROVIDER">
7273                     <context link="provider" field="owner"/>
7274                 </delete>
7275             </actions>
7276         </permacrud>
7277     </class>
7278         <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">
7279                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7280                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7281                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7282                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7283                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7284                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7285                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7286                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7287                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7288                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7289                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7290                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7291                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7292                 </fields>
7293                 <links>
7294                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7295                 </links>
7296         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7297             <actions>
7298                 <create permission="ADMIN_PROVIDER">
7299                     <context link="contact" jump='provider' field="owner"/>
7300                 </create>
7301                 <retrieve permission="ADMIN_PROVIDER">
7302                     <context link="contact" jump='provider' field="owner"/>
7303                 </retrieve>
7304                 <update permission="ADMIN_PROVIDER">
7305                     <context link="contact" jump='provider' field="owner"/>
7306                 </update>
7307                 <delete permission="ADMIN_PROVIDER">
7308                     <context link="contact" jump='provider' field="owner"/>
7309                 </delete>
7310             </actions>
7311         </permacrud>
7312         </class>
7313
7314         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7315                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7316                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7317                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7318                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7319                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7320                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7321                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7322                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7323                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7324                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7325                 </fields>
7326                 <links>
7327                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7328                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7329                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7330                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7331                 </links>
7332         </class>
7333
7334         <class id="acqfc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
7335                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7336                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7337                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7338                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7339                 </fields>
7340                 <links>
7341             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7342                 </links>
7343                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7344                         <actions>
7345                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7346                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7347                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7348                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7349                         </actions>
7350                 </permacrud>
7351         </class>
7352
7353         <class id="acqfy" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
7354                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7355                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7356                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7357                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7358                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7359                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7360                 </fields>
7361                 <links>
7362                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7363                 </links>
7364                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7365                         <actions>
7366                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7367                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7368                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7369                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7370                         </actions>
7371                 </permacrud>
7372         </class>
7373
7374         <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">
7375                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7376                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7377                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7378                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7379                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7380                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7381                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7382                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7383                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7384                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7385                 </fields>
7386                 <links>
7387                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7388                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7389             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7390             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7391                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7392                 </links>
7393         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7394             <actions>
7395                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7396                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7397                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7398                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7399             </actions>
7400         </permacrud>
7401         </class>
7402
7403         <class id="acqfscred" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::funding_source_credit" oils_persist:tablename="acq.funding_source_credit" reporter:label="Credit to Funding Source">
7404                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
7405                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
7406                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
7407                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7408                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7409                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
7410                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
7411                 </fields>
7412                 <links>
7413                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7414                 </links>
7415                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7416                         <actions>
7417                                 <create permission="ADMIN_FUNDING_SOURCE">
7418                     <context link="funding_source" field="owner"/>
7419                 </create>
7420                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
7421                     <context link="funding_source" field="owner"/>
7422                 </retrieve>
7423                                 <update permission="ADMIN_FUNDING_SOURCE">
7424                     <context link="funding_source" field="owner"/>
7425                 </update>
7426                                 <delete permission="ADMIN_FUNDING_SOURCE">
7427                     <context link="funding_source" field="owner"/>
7428                 </delete>
7429                         </actions>
7430                 </permacrud>
7431         </class>
7432
7433         <class id="acqofscred" controller="open-ils.cstore" oils_obj:fieldmapper="acq::ordered_funding_source_credit" oils_persist:tablename="acq.ordered_funding_source_credit" reporter:label="Ordered Funding Source Credit">
7434                 <fields oils_persist:primary="id">
7435                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
7436                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
7437                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
7438                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
7439                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
7440                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7441                 </fields>
7442                 <links>
7443                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7444                 </links>
7445         </class>
7446
7447         <class id="acqfdeb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_debit" oils_persist:tablename="acq.fund_debit" reporter:label="Debit From Fund">
7448                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
7449                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
7450                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7451                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
7452                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
7453                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7454                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
7455                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
7456                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7457                 </fields>
7458                 <links>
7459                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7460                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7461                 </links>
7462                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7463                         <actions>
7464                                 <create permission="ADMIN_ACQ_FUND">
7465                     <context link="fund" field="org"/>
7466                 </create>
7467                                 <retrieve permission="ADMIN_ACQ_FUND">
7468                     <context link="fund" field="org"/>
7469                 </retrieve>
7470                                 <update permission="ADMIN_ACQ_FUND">
7471                     <context link="fund" field="org"/>
7472                 </update>
7473                                 <delete permission="ADMIN_ACQ_FUND">
7474                     <context link="fund" field="org"/>
7475                 </delete>
7476                         </actions>
7477                 </permacrud>
7478         </class>
7479
7480         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
7481                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7482                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7483                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7484                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7485                         <field reporter:label="Year" name="year" reporter:datatype="int" />
7486                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7487                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7488                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7489                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7490                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7491                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7492                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7493                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7494                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7495                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
7496                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7497                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
7498                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
7499                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
7500                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
7501                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7502                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7503                 </fields>
7504                 <links>
7505                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7506                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7507             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
7508             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
7509             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
7510             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
7511             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
7512             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
7513             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
7514             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
7515             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
7516                 </links>
7517         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7518             <actions>
7519                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
7520                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7521                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
7522                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
7523             </actions>
7524         </permacrud>
7525         </class>
7526
7527         <class id="acqfat" controller="open-ils.cstore open-ils.pcrud 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">
7528                 <fields oils_persist:primary="fund">
7529                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7530                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7531                 </fields>
7532                 <links>
7533                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7534                 </links>
7535         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7536             <actions>
7537                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7538                                         <context link="fund" field="org" />
7539                 </retrieve>
7540             </actions>
7541         </permacrud>
7542         </class>
7543
7544         <class id="acqfdt" controller="open-ils.cstore open-ils.pcrud 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">
7545                 <fields oils_persist:primary="fund">
7546                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7547                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
7548                 </fields>
7549                 <links>
7550                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7551                 </links>
7552         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7553             <actions>
7554                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7555                                         <context link="fund" field="org" />
7556                 </retrieve>
7557             </actions>
7558         </permacrud>
7559         </class>
7560
7561         <class id="acqfet" controller="open-ils.cstore open-ils.pcrud 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">
7562                 <fields oils_persist:primary="fund">
7563                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7564                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
7565                 </fields>
7566                 <links>
7567                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7568                 </links>
7569         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7570             <actions>
7571                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7572                                         <context link="fund" field="org" />
7573                 </retrieve>
7574             </actions>
7575         </permacrud>
7576         </class>
7577
7578         <class id="acqfst" controller="open-ils.cstore open-ils.pcrud 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">
7579                 <fields oils_persist:primary="fund">
7580                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7581                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7582                 </fields>
7583                 <links>
7584                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7585                 </links>
7586         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7587             <actions>
7588                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7589                                         <context link="fund" field="org" />
7590                 </retrieve>
7591             </actions>
7592         </permacrud>
7593         </class>
7594
7595         <class id="acqfcb" controller="open-ils.cstore open-ils.pcrud 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">
7596                 <fields oils_persist:primary="fund">
7597                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7598                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
7599                 </fields>
7600                 <links>
7601                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7602                 </links>
7603         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7604             <actions>
7605                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7606                                         <context link="fund" field="org" />
7607                 </retrieve>
7608             </actions>
7609         </permacrud>
7610         </class>
7611
7612    <class id="acqafat" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::all_fund_allocation_total" oils_persist:readonly="true" oils_persist:tablename="acq.all_fund_allocation_total" reporter:label="All Fund Allocation Total">
7613         <fields oils_persist:primary="fund">
7614             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7615             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7616         </fields>
7617         <links>
7618             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7619         </links>
7620     </class>
7621
7622    <class id="acqafet" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::all_fund_encumbrance_total" oils_persist:readonly="true" oils_persist:tablename="acq.all_fund_encumbrance_total" reporter:label="All Fund Encumbrance Total">
7623         <fields oils_persist:primary="fund">
7624             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7625             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
7626         </fields>
7627         <links>
7628             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7629         </links>
7630     </class>
7631
7632    <class id="acqafst" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::all_fund_spent_total" oils_persist:readonly="true" oils_persist:tablename="acq.all_fund_spent_total" reporter:label="All Fund Spent Total">
7633         <fields oils_persist:primary="fund">
7634             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7635             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7636         </fields>
7637         <links>
7638             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7639         </links>
7640     </class>
7641
7642    <class id="acqafsb" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::all_fund_spent_balance" oils_persist:readonly="true" oils_persist:tablename="acq.all_fund_spent_balance" reporter:label="All Fund Spent Balance">
7643         <fields oils_persist:primary="fund">
7644             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7645             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
7646         </fields>
7647         <links>
7648             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7649         </links>
7650     </class>
7651
7652    <class id="acqafcb" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::all_fund_combined_balance" oils_persist:readonly="true" oils_persist:tablename="acq.all_fund_combined_balance" reporter:label="All Fund Combined Total">
7653         <fields oils_persist:primary="fund">
7654             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7655             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
7656         </fields>
7657         <links>
7658             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7659         </links>
7660     </class>
7661
7662         <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">
7663                 <fields oils_persist:primary="funding_source">
7664                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7665                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
7666                 </fields>
7667                 <links>
7668                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7669                 </links>
7670         </class>
7671
7672         <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">
7673                 <fields oils_persist:primary="funding_source">
7674                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7675                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
7676                 </fields>
7677                 <links>
7678                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7679                 </links>
7680         </class>
7681
7682         <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">
7683                 <fields oils_persist:primary="funding_source">
7684                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7685                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
7686                 </fields>
7687                 <links>
7688                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7689                 </links>
7690         </class>
7691
7692         <class id="acqfsb" controller="open-ils.cstore open-ils.pcrud 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">
7693                 <fields oils_persist:primary="fund">
7694                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7695                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
7696                 </fields>
7697                 <links>
7698                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7699                 </links>
7700         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7701             <actions>
7702                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7703                                         <context link="fund" field="org" />
7704                 </retrieve>
7705             </actions>
7706         </permacrud>
7707     </class>
7708     <class id="acqfsum" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_summary" reporter:label="Fund Summary" reporter:core="true" oils_persist:readonly="true">
7709         <oils_persist:source_definition><![CDATA[
7710             SELECT
7711                 acqf.*,
7712                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
7713                 COALESCE(acqfst.amount, 0.00) AS spent_total,
7714                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
7715                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
7716             FROM
7717                 acq.fund acqf
7718                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
7719                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
7720                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
7721                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
7722         ]]></oils_persist:source_definition>
7723         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7724             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7725             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7726             <field reporter:label="Name" name="name" reporter:datatype="text" />
7727             <field reporter:label="Year" name="year" reporter:datatype="int" />
7728             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7729             <field reporter:label="Code" name="code" reporter:datatype="text" />
7730             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7731             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7732             <field reporter:label="Active" name="active" reporter:datatype="bool" />
7733             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7734             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7735
7736             <!-- non fund-native fields -->
7737             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
7738             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
7739             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
7740             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
7741         </fields>
7742         <links>
7743             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
7744             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7745             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7746         </links>
7747         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7748             <actions>
7749                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7750             </actions>
7751         </permacrud>
7752         </class>
7753         <class id="acqfa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_allocation" oils_persist:tablename="acq.fund_allocation" reporter:label="Fund Allocation">
7754                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
7755                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7756                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7757                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7758                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7759                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7760                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7761                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7762                 </fields>
7763                 <links>
7764                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7765                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7766                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7767                 </links>
7768                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7769                         <actions>
7770                                 <create permission="ADMIN_ACQ_FUND">
7771                     <context link="fund" field="org"/>
7772                 </create>
7773                                 <retrieve permission="ADMIN_ACQ_FUND">
7774                     <context link="fund" field="org"/>
7775                 </retrieve>
7776                                 <update permission="ADMIN_ACQ_FUND">
7777                     <context link="fund" field="org"/>
7778                 </update>
7779                                 <delete permission="ADMIN_ACQ_FUND">
7780                     <context link="fund" field="org"/>
7781                 </delete>
7782                         </actions>
7783                 </permacrud>
7784         </class>
7785
7786     <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">
7787         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
7788             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7789             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7790             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7791             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
7792             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
7793             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7794             <field reporter:label="Note" name="note" reporter:datatype="text" />
7795             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7796         </fields>
7797         <links>
7798             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7799             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7800             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7801         </links>
7802                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7803                         <actions>
7804                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7805                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7806                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7807                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7808                         </actions>
7809                 </permacrud>
7810     </class>
7811
7812         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
7813                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
7814                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
7815                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7816                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
7817                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7818                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7819                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7820                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
7821                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
7822                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7823                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7824                 </fields>
7825                 <links>
7826                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7827                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7828                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7829                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7830                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
7831                 </links>
7832                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7833                         <actions>
7834                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
7835                         </actions>
7836                 </permacrud>
7837         </class>
7838
7839         <class id="acqcr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::cancel_reason" oils_persist:tablename="acq.cancel_reason" reporter:label="Cancel Reason">
7840                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
7841                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7842                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
7843                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7844                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7845                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
7846                 </fields>
7847                 <links>
7848                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7849                 </links>
7850                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7851                         <actions>
7852                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7853                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
7854                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7855                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7856                         </actions>
7857                 </permacrud>
7858         </class>
7859
7860         <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">
7861                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
7862                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7863                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7864                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7865                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7866                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7867                         <field reporter:label="State" name="state" reporter:datatype="text" />
7868                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
7869                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7870                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7871                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
7872                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7873                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7874                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7875                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
7876                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7877                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
7878                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
7879                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
7880                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
7881                 </fields>
7882                 <links>
7883                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7884                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7885                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7886                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
7887                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7888                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
7889                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
7890                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
7891                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7892                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7893                 </links>
7894                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7895                         <actions>
7896                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7897                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7898                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7899                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7900                         </actions>
7901                 </permacrud>
7902         </class>
7903
7904         <class id="acqpoh" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::acq_purchase_order_history" oils_persist:tablename="acq.acq_purchase_order_history" reporter:label="Purchase Order History">
7905                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
7906                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7907                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7908                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7909                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
7910                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7911                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7912                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7913                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
7914                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7915                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7916                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7917                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7918                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
7919                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7920                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7921                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7922                 </fields>
7923                 <links>
7924                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
7925                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7926                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7927                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7928                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7929                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7930                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7931                 </links>
7932                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7933             <actions>
7934                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7935             </actions>
7936                 </permacrud>
7937         </class>
7938
7939         <class id="acqpon" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::po_note" oils_persist:tablename="acq.po_note" reporter:label="PO Note">
7940                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
7941                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7942                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7943                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7944                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7945                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7946                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7947                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
7948                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7949                 </fields>
7950                 <links>
7951                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7952                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7953                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7954                 </links>
7955                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7956             <actions>
7957                 <create permission="CREATE_PURCHASE_ORDER">
7958                     <context link="purchase_order" field="ordering_agency"/>
7959                 </create>
7960                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7961                     <context link="purchase_order" field="ordering_agency"/>
7962                 </retrieve>
7963                 <update permission="CREATE_PURCHASE_ORDER">
7964                     <context link="purchase_order" field="ordering_agency"/>
7965                 </update>
7966                 <delete permission="CREATE_PURCHASE_ORDER">
7967                     <context link="purchase_order" field="ordering_agency"/>
7968                 </delete>
7969             </actions>
7970                 </permacrud>
7971         </class>
7972
7973         <class id="acqpoi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::po_item" oils_persist:tablename="acq.po_item" reporter:label="Purchase Order Item">
7974                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
7975                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7976                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7977                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7978                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
7979                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
7980                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
7981                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7982                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
7983                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
7984                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7985                 </fields>
7986                 <links>
7987                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7988                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7989                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7990                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7991                 </links>
7992                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7993             <actions>
7994                 <create permission="CREATE_PURCHASE_ORDER">
7995                     <context link="purchase_order" field="ordering_agency"/>
7996                 </create>
7997                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7998                     <context link="purchase_order" field="ordering_agency"/>
7999                 </retrieve>
8000                 <update permission="CREATE_PURCHASE_ORDER">
8001                     <context link="purchase_order" field="ordering_agency"/>
8002                 </update>
8003                 <delete permission="CREATE_PURCHASE_ORDER">
8004                     <context link="purchase_order" field="ordering_agency"/>
8005                 </delete>
8006             </actions>
8007                 </permacrud>
8008         </class>
8009
8010         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
8011                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
8012                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
8013                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
8014                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
8015                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8016                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8017                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8018                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8019                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
8020                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
8021                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
8022                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
8023                         <field reporter:label="State" name="state" reporter:datatype="text" />
8024                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8025                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8026                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
8027                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8028                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8029                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8030                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
8031                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
8032                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
8033                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
8034                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
8035                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
8036                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
8037                 </fields>
8038                 <links>
8039                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8040                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8041                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8042                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8043                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8044                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8045                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8046                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
8047                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
8048                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
8049                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8050                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
8051                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8052                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
8053                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
8054                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8055                 </links>
8056                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8057                         <actions>
8058                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
8059                                         <context link="purchase_order" field="ordering_agency"/>
8060                                         <context link="picklist" field="org_unit"/>
8061                                 </retrieve>
8062                         </actions>
8063                 </permacrud>
8064         </class>
8065
8066         <class id="acqlih" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::acq_lineitem_history" oils_persist:tablename="acq.acq_lineitem_history" reporter:label="Line Item History">
8067                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
8068                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8069                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8070                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8071                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
8072                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8073                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8074                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
8075                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8076                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8077                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
8078                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
8079                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8080                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8081                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
8082                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
8083                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
8084                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8085                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
8086                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8087                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8088                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8089                 </fields>
8090                 <links>
8091                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
8092                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8093                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8094                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8095                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8096                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8097                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8098                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8099                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8100                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8101                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8102                 </links>
8103                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8104                         <actions>
8105                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8106                                         <context link="purchase_order" field="ordering_agency"/>
8107                                         <context link="picklist" field="org_unit"/>
8108                                 </retrieve>
8109                         </actions>
8110                 </permacrud>
8111         </class>
8112
8113         <class id="acqliat" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem_alert_text" oils_persist:tablename="acq.lineitem_alert_text" reporter:label="Line Item Alert Text">
8114                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
8115                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
8116                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8117                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8118                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8119                 </fields>
8120                 <links>
8121                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8122                 </links>
8123                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8124                         <actions>
8125                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8126                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
8127                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8128                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8129                         </actions>
8130                 </permacrud>
8131         </class>
8132
8133         <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">
8134                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
8135                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
8136                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
8137                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8138                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8139                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8140                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8141                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8142                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
8143                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8144                 </fields>
8145                 <links>
8146                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8147                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8148                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8149                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
8150                 </links>
8151         </class>
8152
8153         <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">
8154                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
8155                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
8156                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
8157                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
8158                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
8159                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
8160                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
8161                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
8162                 </fields>
8163                 <links>
8164                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8165                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
8166                 </links>
8167         </class>
8168
8169         <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">
8170                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
8171                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
8172                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8173                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8174                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8175                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8176                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8177                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8178                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8179                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8180                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8181                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8182                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8183                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8184                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8185                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8186                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
8187                 </fields>
8188                 <links>
8189                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8190                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
8191                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8192                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8193                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8194                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8195                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8196                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8197                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
8198                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
8199                 </links>
8200         </class>
8201
8202         <class id="acqliad" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem_attr_definition" oils_persist:tablename="acq.lineitem_attr_definition" reporter:label="Line Item Attribute Definition">
8203                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8204                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8205                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8206                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8207                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8208                 </fields>
8209                 <links/>
8210                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8211                         <actions>
8212                                 <retrieve />
8213                         </actions>
8214                 </permacrud>
8215         </class>
8216
8217         <class id="acqlimad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem_marc_attr_definition" oils_persist:tablename="acq.lineitem_marc_attr_definition" reporter:label="Line Item MARC Attribute Definition">
8218                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8219                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8220                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8221                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8222                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8223                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8224             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8225                 </fields>
8226                 <links/>
8227         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8228             <actions>
8229                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8230                 <retrieve />
8231                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8232                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8233             </actions>
8234         </permacrud>
8235         </class>
8236
8237         <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">
8238                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8239                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8240                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8241                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8242                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8243                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8244                 </fields>
8245                 <links/>
8246         </class>
8247         <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">
8248                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8249                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8250                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8251                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8252                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8253                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8254                 </fields>
8255                 <links>
8256                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8257                 </links>
8258         </class>
8259
8260         <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">
8261             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8262                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8263                 <field reporter:label="Code" name="code" reporter:datatype="text" />
8264                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8265                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8266                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8267                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8268         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8269
8270             </fields>
8271             <links>
8272                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8273             </links>
8274             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8275                 <actions>
8276                     <create permission="ADMIN_PROVIDER">
8277                         <context link="provider" field="owner"/>
8278                     </create>
8279                     <retrieve permission="ADMIN_PROVIDER">
8280                         <context link="provider" field="owner"/>
8281                     </retrieve>
8282                     <update permission="ADMIN_PROVIDER">
8283                         <context link="provider" field="owner"/>
8284                     </update>
8285                     <delete permission="ADMIN_PROVIDER">
8286                         <context link="provider" field="owner"/>
8287                     </delete>
8288                 </actions>
8289             </permacrud>
8290         </class>
8291         
8292         <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">
8293             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8294                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8295                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8296                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8297                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8298             </fields>
8299             <links>
8300                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8301             </links>
8302             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8303                 <actions>
8304                     <create permission="ADMIN_PROVIDER">
8305                         <context link="provider" field="owner"/>
8306                     </create>
8307                     <retrieve permission="ADMIN_PROVIDER">
8308                         <context link="provider" field="owner"/>
8309                     </retrieve>
8310                     <update permission="ADMIN_PROVIDER">
8311                         <context link="provider" field="owner"/>
8312                     </update>
8313                     <delete permission="ADMIN_PROVIDER">
8314                         <context link="provider" field="owner"/>
8315                     </delete>
8316                 </actions>
8317             </permacrud>
8318         </class>
8319         
8320         <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">
8321             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8322                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8323                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8324                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8325                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8326                 </fields>
8327                 <links/>
8328         </class>
8329
8330         <class id="acqedi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::edi_account" oils_persist:tablename="acq.edi_account" reporter:label="EDI Account">
8331                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8332                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8333                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8334                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8335                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8336                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8337                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8338                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8339                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8340                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8341                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8342                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8343                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8344                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8345                 </fields>
8346                 <links>
8347                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8348                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8349                 </links>
8350         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8351             <actions>
8352                 <create permission="ADMIN_PROVIDER">
8353                     <context link="provider" field="owner"/>
8354                 </create>
8355                 <retrieve permission="ADMIN_PROVIDER">
8356                     <context link="provider" field="owner"/>
8357                 </retrieve>
8358                 <update permission="ADMIN_PROVIDER">
8359                     <context link="provider" field="owner"/>
8360                 </update>
8361                 <delete permission="ADMIN_PROVIDER">
8362                     <context link="provider" field="owner"/>
8363                 </delete>
8364             </actions>
8365         </permacrud>
8366         </class>
8367
8368         <class id="acqedim" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::edi_message" oils_persist:tablename="acq.edi_message" reporter:label="EDI Message">
8369                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8370                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8371                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8372                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8373                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8374                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8375                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8376                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8377                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8378                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8379                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8380                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8381                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8382                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8383                 </fields>
8384                 <links>
8385                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8386                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8387                 </links>
8388         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8389             <actions>
8390                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8391                     <context link="account" jump="provider" field="owner"/>
8392                 </retrieve>
8393                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8394                     <context link="account" jump="provider" field="owner"/>
8395                 </update>
8396                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8397                     <context link="account" jump="provider" field="owner"/>
8398                 </delete>
8399             </actions>
8400         </permacrud>
8401         </class>
8402
8403
8404         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
8405                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
8406                         <field name="id" reporter:datatype="id" />
8407                         <field name="parent" reporter:datatype="link"/>
8408                         <field name="owner" reporter:datatype="link"/>
8409                         <field name="create_time" reporter:datatype="timestamp"/>
8410                         <field name="name" reporter:datatype="text"/>
8411                         <field name="shared" reporter:datatype="bool"/>
8412                         <field name="share_with" reporter:datatype="link"/>
8413                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8414                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
8415                 </fields>
8416                 <links>
8417                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8418                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
8419                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
8420                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8421                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
8422                 </links>
8423         </class>
8424         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
8425                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
8426                         <field name="id" reporter:datatype="id" />
8427                         <field name="parent" reporter:datatype="link"/>
8428                         <field name="owner" reporter:datatype="link"/>
8429                         <field name="create_time" reporter:datatype="timestamp"/>
8430                         <field name="name" reporter:datatype="text"/>
8431                         <field name="shared" reporter:datatype="bool"/>
8432                         <field name="share_with" reporter:datatype="link"/>
8433                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8434                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
8435                 </fields>
8436                 <links>
8437                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8438                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
8439                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
8440                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8441                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
8442                 </links>
8443         </class>
8444         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
8445                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
8446                         <field name="id" reporter:datatype="id" />
8447                         <field name="parent" reporter:datatype="link"/>
8448                         <field name="owner" reporter:datatype="link"/>
8449                         <field name="create_time" reporter:datatype="timestamp"/>
8450                         <field name="name" reporter:datatype="text"/>
8451                         <field name="shared" reporter:datatype="bool"/>
8452                         <field name="share_with" reporter:datatype="link"/>
8453                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8454                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8455                 </fields>
8456                 <links>
8457                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8458                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
8459                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
8460                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8461                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
8462                 </links>
8463         </class>
8464         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
8465                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
8466                         <field name="id" reporter:datatype="id" />
8467                         <field name="owner" reporter:datatype="link"/>
8468                         <field name="create_time" reporter:datatype="timestamp"/>
8469                         <field name="name" reporter:datatype="text"/>
8470                         <field name="data" reporter:datatype="text"/>
8471                         <field name="folder" reporter:datatype="link"/>
8472                         <field name="description" reporter:datatype="text"/>
8473                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8474                 </fields>
8475                 <links>
8476                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8477                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
8478                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
8479                 </links>
8480         </class>
8481         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
8482                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
8483                         <field name="id" reporter:datatype="id" />
8484                         <field name="owner" reporter:datatype="link"/>
8485                         <field name="create_time" reporter:datatype="timestamp"/>
8486                         <field name="template" reporter:datatype="link"/>
8487                         <field name="data" reporter:datatype="text"/>
8488                         <field name="folder" reporter:datatype="link"/>
8489                         <field name="recur" reporter:datatype="bool"/>
8490                         <field name="recurrence" reporter:datatype="interval"/>
8491                         <field name="name" reporter:datatype="text"/>
8492                         <field name="description" reporter:datatype="text"/>
8493                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
8494                 </fields>
8495                 <links>
8496                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8497                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
8498                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
8499                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
8500                 </links>
8501         </class>
8502         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
8503                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
8504                         <field name="id" reporter:datatype="id" />
8505                         <field name="runner" reporter:datatype="link"/>
8506                         <field name="start_time" reporter:datatype="timestamp"/>
8507                         <field name="complete_time" reporter:datatype="timestamp"/>
8508                         <field name="run_time" reporter:datatype="timestamp"/>
8509                         <field name="email" reporter:datatype="text"/>
8510                         <field name="excel_format" reporter:datatype="bool"/>
8511                         <field name="csv_format" reporter:datatype="bool"/>
8512                         <field name="html_format" reporter:datatype="bool"/>
8513                         <field name="error_code" reporter:datatype="int"/>
8514                         <field name="error_text" reporter:datatype="text"/>
8515                         <field name="report" reporter:datatype="link"/>
8516                         <field name="folder" reporter:datatype="link"/>
8517                         <field name="chart_pie" reporter:datatype="bool"/>
8518                         <field name="chart_bar" reporter:datatype="bool"/>
8519                         <field name="chart_line" reporter:datatype="bool"/>
8520                 </fields>
8521                 <links>
8522                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
8523                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
8524                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
8525                 </links>
8526         </class>
8527         <class id="rmsr" controller="open-ils.reporter-store open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="reporter::materialized_simple_record" oils_persist:tablename="reporter.materialized_simple_record" reporter:label="Fast Simple Record Extracts">
8528                 <fields oils_persist:primary="id">
8529                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8530                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8531                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8532                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8533                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8534                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8535                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8536                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8537                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8538                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8539                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8540                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8541                 </fields>
8542                 <links>
8543                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8544                 </links>
8545                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8546                         <actions>
8547                                 <retrieve />
8548                         </actions>
8549                 </permacrud>
8550         </class>
8551         <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">
8552                 <fields oils_persist:primary="id">
8553                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8554                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8555                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8556                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8557                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8558                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8559                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8560                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8561                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8562                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8563                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8564                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8565                 </fields>
8566                 <links>
8567                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8568                 </links>
8569         </class>
8570         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
8571                 <fields oils_persist:primary="id">
8572                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8573                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
8574                         <field reporter:label="Fingerprint" name="fingerprint" />
8575                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8576                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8577                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8578                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8579                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
8580                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8581                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8582                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8583                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
8584                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
8585                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
8586                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8587                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8588                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
8589                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
8590                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
8591                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
8592                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
8593                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
8594                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8595                 </fields>
8596                 <links>
8597                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
8598                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8599                 </links>
8600         </class>
8601         <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">
8602                 <fields oils_persist:primary="id">
8603                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
8604                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
8605                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
8606                 </fields>
8607                 <links>
8608                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
8609                 </links>
8610         </class>
8611         <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">
8612                 <fields oils_persist:primary="id">
8613                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
8614                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
8615                 </fields>
8616                 <links>
8617                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
8618                 </links>
8619         </class>
8620         <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">
8621                 <fields oils_persist:primary="id">
8622                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
8623                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
8624                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
8625                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
8626                 </fields>
8627                 <links>
8628                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
8629                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
8630                 </links>
8631         </class>
8632         <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">
8633                 <fields oils_persist:primary="xact">
8634                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8635                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
8636                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
8637                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
8638                 </fields>
8639                 <links>
8640                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8641                 </links>
8642         </class>
8643         <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">
8644                 <fields oils_persist:primary="xact">
8645                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8646                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
8647                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
8648                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
8649                 </fields>
8650                 <links>
8651                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8652                 </links>
8653         </class>
8654         <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)">
8655                 <fields oils_persist:primary="id">
8656                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
8657                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
8658                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
8659                 </fields>
8660                 <links>
8661                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8662                 </links>
8663         </class>
8664         <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">
8665                 <fields oils_persist:primary="id">
8666                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
8667                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
8668                 </fields>
8669                 <links>
8670                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
8671                 </links>
8672         </class>
8673         <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">
8674                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
8675                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
8676                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
8677                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
8678                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
8679                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
8680                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
8681                 </fields>
8682                 <links>
8683                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8684                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
8685                 </links>
8686                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8687                         <actions>
8688                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8689                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8690                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8691                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8692                         </actions>
8693                 </permacrud>
8694         </class>
8695         <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">
8696                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
8697                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
8698                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
8699                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
8700                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8701                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8702                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
8703                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8704                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
8705                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
8706                 </fields>
8707                 <links>
8708                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8709                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8710                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8711                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8712                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8713                 </links>
8714                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8715                         <actions>
8716                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
8717                                         <context link="formula" field="owner"/>
8718                                 </create>
8719                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
8720                                         <context link="formula" field="owner"/>
8721                                 </retrieve>
8722                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
8723                                         <context link="formula" field="owner"/>
8724                                 </update>
8725                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
8726                                         <context link="formula" field="owner"/>
8727                                 </delete>
8728                         </actions>
8729                 </permacrud>
8730         </class>
8731
8732         <class id="acqdfa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::distribution_formula_application" oils_persist:tablename="acq.distribution_formula_application" reporter:label="Distribution Formula Application">
8733                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
8734                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8735                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8736                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8737                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
8738                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8739                 </fields>
8740                 <links>
8741                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8742                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8743                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8744                 </links>
8745                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8746                         <actions>
8747                                 <create permission="CREATE_PURCHASE_ORDER">
8748                                         <context link="formula" field="owner"/>
8749                 </create>
8750                                 <retrieve permission="CREATE_PURCHASE_ORDER">
8751                                         <context link="formula" field="owner"/>
8752                 </retrieve>
8753                                 <update permission="CREATE_PURCHASE_ORDER">
8754                                         <context link="formula" field="owner"/>
8755                 </update>
8756                                 <delete permission="CREATE_PURCHASE_ORDER">
8757                                         <context link="formula" field="owner"/>
8758                 </delete>
8759                         </actions>
8760                 </permacrud>
8761         </class>
8762
8763         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
8764                 <fields oils_persist:primary="id">
8765                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
8766                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8767                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
8768                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
8769                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
8770                 </fields>
8771                 <links>
8772                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8773                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8774                 </links>
8775         </class>
8776
8777         <class id="acqclt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_type" oils_persist:tablename="acq.claim_type" reporter:label="Claim Type">
8778                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
8779                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8780                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8781                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8782                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8783                 </fields>
8784                 <links>
8785                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8786                 </links>
8787                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8788                         <actions>
8789                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8790                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8791                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8792                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8793                         </actions>
8794                 </permacrud>
8795         </class>
8796
8797         <class id="acqclet" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_event_type" oils_persist:tablename="acq.claim_event_type" reporter:label="Claim Event Type">
8798                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
8799                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8800                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8801                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8802                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8803                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
8804                 </fields>
8805                 <links>
8806                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8807                 </links>
8808                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8809                         <actions>
8810                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8811                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8812                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8813                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8814                         </actions>
8815                 </permacrud>
8816         </class>
8817
8818         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
8819                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
8820                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8821                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8822                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8823                 </fields>
8824                 <links>
8825                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8826                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8827                 </links>
8828         </class>
8829
8830         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
8831                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
8832                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8833                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8834                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8835                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8836                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8837                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8838                 </fields>
8839                 <links>
8840                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8841                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
8842                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8843                 </links>
8844         </class>
8845
8846         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
8847                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
8848                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8849                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8850                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
8851                 </fields>
8852                 <links>
8853                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8854                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
8855                 </links>
8856         </class>
8857
8858         <class id="acqscle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim_event" oils_persist:tablename="acq.serial_claim_event" reporter:label="Serial Claim Event">
8859                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
8860                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8861                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8862                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8863                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8864                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8865                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8866                 </fields>
8867                 <links>
8868                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8869                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
8870                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8871                 </links>
8872         </class>
8873
8874         <class id="acqclp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_policy" oils_persist:tablename="acq.claim_policy" reporter:label="Claim Policy">
8875                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
8876                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
8877                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8878                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
8879                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8880                 </fields>
8881                 <links>
8882                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8883                 </links>
8884                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8885             <actions>
8886                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8887                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
8888                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8889                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8890             </actions>
8891                 </permacrud>
8892         </class>
8893
8894         <class id="acqclpa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_policy_action" oils_persist:tablename="acq.claim_policy_action" reporter:label="Claim Policy Action">
8895                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
8896                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
8897                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
8898                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
8899                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
8900                 </fields>
8901                 <links>
8902                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8903                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
8904                 </links>
8905                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8906                         <actions>
8907                                 <create permission="ADMIN_CLAIM_POLICY">
8908                                         <context link="claim_policy" field="org_unit"/>
8909                 </create>
8910                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
8911                                         <context link="claim_policy" field="org_unit"/>
8912                 </retrieve>
8913                                 <update permission="ADMIN_CLAIM_POLICY">
8914                                         <context link="claim_policy" field="org_unit"/>
8915                 </update>
8916                                 <delete permission="ADMIN_CLAIM_POLICY">
8917                                         <context link="claim_policy" field="org_unit"/>
8918                 </delete>
8919                         </actions>
8920                 </permacrud>
8921         </class>
8922
8923     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
8924         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
8925             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8926             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8927             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8928             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
8929             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
8930             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
8931             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
8932             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
8933             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
8934             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
8935             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
8936             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
8937             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
8938             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
8939             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8940         </fields>
8941     </class>
8942
8943     <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">
8944         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
8945             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8946             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8947             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8948             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8949             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8950         </fields>
8951     </class>
8952
8953     <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">
8954         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
8955             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8956             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8957             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8958             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8959             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8960             <field reporter:label="City" name="city" reporter:datatype="text"/>
8961             <field reporter:label="State" name="state" reporter:datatype="text"/>
8962             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8963             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8964             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8965         </fields>
8966     </class>
8967
8968     <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">
8969         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
8970             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8971             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8972             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8973             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8974             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8975             <field reporter:label="City" name="city" reporter:datatype="text"/>
8976             <field reporter:label="State" name="state" reporter:datatype="text"/>
8977             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8978             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8979             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8980         </fields>
8981     </class>
8982
8983     <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">
8984         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
8985             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8986             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8987             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8988             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
8989             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
8990             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8991         </fields>
8992     </class>
8993
8994         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
8995                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
8996                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
8997                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8998                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8999                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
9000                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
9001                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
9002                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
9003                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
9004                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
9005                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
9006                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
9007                 </fields>
9008                 <links>
9009                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9010                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9011                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9012                 </links>
9013         </class>
9014
9015         <class id="afscv" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset_col_val" oils_persist:tablename="action.fieldset_col_val" reporter:label="Fieldset Column Value">
9016                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
9017                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
9018                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
9019                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
9020                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
9021                 </fields>
9022                 <links>
9023                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
9024                 </links>
9025         </class>
9026
9027     <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">
9028         <fields>
9029             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9030             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9031             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9032         </fields>
9033                 <links>
9034                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9035                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9036                 </links>
9037     </class>
9038
9039     <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">
9040         <fields>
9041             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9042             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
9043         </fields>
9044                 <links>
9045                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9046                 </links>
9047     </class>
9048
9049     <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">
9050         <fields>
9051             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9052             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9053             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9054         </fields>
9055                 <links>
9056                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9057                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9058                 </links>
9059     </class>
9060
9061     <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">
9062         <fields>
9063             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9064             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
9065         </fields>
9066                 <links>
9067                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9068                 </links>
9069     </class>
9070
9071     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
9072                 <oils_persist:source_definition>
9073
9074             SELECT  DISTINCT l.*
9075               FROM  action.unfulfilled_hold_loops l
9076                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
9077               WHERE l.count = m.max
9078
9079                 </oils_persist:source_definition>
9080         <fields>
9081             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9082             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9083             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9084         </fields>
9085                 <links>
9086                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9087                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9088                 </links>
9089     </class>
9090
9091         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
9092                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
9093                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
9094                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
9095                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
9096                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
9097                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
9098                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
9099                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
9100                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
9101                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
9102                 </fields>
9103                 <links>
9104                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
9105                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
9106                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
9107                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
9108                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
9109                 </links>
9110         </class>
9111
9112         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
9113                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
9114                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
9115                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
9116                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9117                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
9118                 </fields>
9119                 <links>
9120                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
9121                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
9122                 </links>
9123         </class>
9124
9125         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
9126                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
9127                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
9128                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
9129                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
9130                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
9131                 </fields>
9132                 <links>
9133                 </links>
9134         </class>
9135
9136         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
9137                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
9138                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
9139                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
9140                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9141                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
9142                 </fields>
9143                 <links>
9144                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
9145                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
9146                 </links>
9147         </class>
9148         
9149         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
9150                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
9151                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
9152                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
9153                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
9154                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
9155                 </fields>
9156                 <links>
9157                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
9158                 </links>
9159         </class>
9160         
9161         <class id="qfpd" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_param_def" oils_persist:tablename="query.function_param_def" reporter:label="Function Parameter Definition">
9162                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
9163                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
9164                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9165                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9166                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
9167                 </fields>
9168                 <links>
9169                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9170                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
9171                 </links>
9172         </class>
9173
9174         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
9175                 <fields oils_persist:primary="name">
9176                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
9177                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9178                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
9179                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9180                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
9181                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
9182                 </fields>
9183                 <links>
9184                 </links>
9185         </class>
9186
9187         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
9188                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9189                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9190                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
9191                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9192                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9193                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9194                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9195                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9196                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9197                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9198                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9199                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9200                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9201                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9202                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9203                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9204                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9205                 </fields>
9206                 <links>
9207                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9208                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9209                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9210                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9211                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9212                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9213                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9214                 </links>
9215         </class>
9216
9217         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9218                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9219                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9220                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9221                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9222                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9223                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9224                 </fields>
9225                 <links>
9226                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9227                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9228                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9229                 </links>
9230         </class>
9231
9232         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
9233                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
9234                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
9235                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
9236                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
9237                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
9238                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
9239                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
9240                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9241                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
9242                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9243                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
9244                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
9245                 </fields>
9246                 <links>
9247                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9248                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
9249                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
9250                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
9251                 </links>
9252         </class>
9253
9254         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
9255                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
9256                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
9257                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
9258                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9259                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9260                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
9261                 </fields>
9262                 <links>
9263                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
9264                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
9265                 </links>
9266         </class>
9267
9268         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
9269                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
9270                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
9271                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9272                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9273                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9274                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
9275                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
9276                 </fields>
9277                 <links>
9278                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9279                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9280                 </links>
9281         </class>
9282
9283         <class id="qobi" controller="open-ils.cstore" oils_obj:fieldmapper="query::order_by_item" oils_persist:tablename="query.order_by_item" reporter:label="Order By Item">
9284                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9285                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9286                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9287                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9288                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9289                 </fields>
9290                 <links>
9291                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9292                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9293                 </links>
9294         </class>
9295
9296         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9297                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9298                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9299                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9300                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9301                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9302                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9303                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9304                 </fields>
9305                 <links>
9306                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9307                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9308                 </links>
9309         </class>
9310
9311         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
9312                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9313                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9314                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9315                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9316                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9317                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9318                 </fields>
9319                 <links>
9320                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9321                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9322                 </links>
9323         </class>
9324
9325         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
9326                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9327                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9328                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9329                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9330                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9331                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9332                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9333                 </fields>
9334                 <links>
9335                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9336                 </links>
9337         </class>
9338
9339         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9340                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9341                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9342                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9343                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9344                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9345                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9346                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9347                 </fields>
9348                 <links>
9349                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9350                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9351                 </links>
9352         </class>
9353
9354         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9355                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9356                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9357                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9358                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9359                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9360                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9361                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9362                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9363                 </fields>
9364                 <links>
9365                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9366                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9367                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9368                 </links>
9369         </class>
9370
9371         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9372                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9373                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9374                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9375                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9376                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9377                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9378                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9379                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9380                 </fields>
9381                 <links>
9382                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9383                 </links>
9384         </class>
9385
9386         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
9387                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9388                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9389                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9390                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9391                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9392                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9393                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9394                 </fields>
9395                 <links>
9396                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9397                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9398                 </links>
9399         </class>
9400
9401         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
9402                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9403                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9404                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9405                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9406                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9407                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9408                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9409                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9410                 </fields>
9411                 <links>
9412                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9413                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9414                 </links>
9415         </class>
9416
9417         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
9418                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9419                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9420                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9421                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9422                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9423                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9424                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9425                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9426                 </fields>
9427                 <links>
9428                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9429                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9430                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9431                 </links>
9432         </class>
9433
9434         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
9435                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9436                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9437                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9438                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9439                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9440                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9441                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9442                 </fields>
9443                 <links>
9444                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9445                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9446                 </links>
9447         </class>
9448
9449         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
9450                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9451                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9452                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9453                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9454                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9455                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9456                 </fields>
9457                 <links>
9458                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9459                 </links>
9460         </class>
9461
9462         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
9463                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9464                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9465                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9466                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9467                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9468                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9469                 </fields>
9470                 <links>
9471                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9472                 </links>
9473         </class>
9474
9475         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
9476                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9477                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9478                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9479                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9480                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9481                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9482                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9483                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9484                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9485                 </fields>
9486                 <links>
9487                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9488                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9489                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9490                 </links>
9491         </class>
9492
9493         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
9494                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9495                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9496                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9497                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9498                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9499                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9500                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9501                 </fields>
9502                 <links>
9503                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9504                 </links>
9505         </class>
9506
9507         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
9508                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9509                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9510                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9511                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9512                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9513                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9514                 </fields>
9515                 <links>
9516                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9517                 </links>
9518         </class>
9519
9520         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
9521                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9522                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9523                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9524                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9525                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9526                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9527                 </fields>
9528                 <links>
9529                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9530                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9531                 </links>
9532         </class>
9533
9534         <class id="bmpc" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::marc21_physical_characteristics" oils_persist:tablename="biblio.marc21_physical_characteristics" reporter:label="MARC21 Physical Characteristics" oils_persist:field_safe="true" oils_persist:readonly="true">
9535                 <fields oils_persist:primary="id">
9536                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
9537                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
9538                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
9539                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
9540                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
9541                 </fields>
9542                 <links>
9543                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
9544                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9545                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
9546                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
9547                 </links>
9548         </class>
9549
9550         <class id="cmfpm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_ff_pos_map" oils_persist:tablename="config.marc21_ff_pos_map" reporter:label="MARC21 Fixed Field Map" oils_persist:field_safe="true">
9551                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
9552                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9553                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
9554                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9555                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
9556                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9557                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9558                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
9559                 </fields>
9560                 <links/>
9561                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9562                         <actions>
9563                                 <retrieve/>
9564                         </actions>
9565                 </permacrud>
9566         </class>
9567
9568         <class id="cmpctm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_physical_characteristic_type_map" oils_persist:tablename="config.marc21_physical_characteristic_type_map" reporter:label="MARC21 Physical Characteristic Type Map" oils_persist:field_safe="true">
9569                 <fields oils_persist:primary="ptype_key">
9570                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
9571                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9572                 </fields>
9573                 <links/>
9574                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9575                         <actions>
9576                                 <retrieve/>
9577                         </actions>
9578                 </permacrud>
9579         </class>
9580
9581         <class id="cmpcsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_physical_characteristic_subfield_map" oils_persist:tablename="config.marc21_physical_characteristic_subfield_map" reporter:label="MARC21 Physical Characteristic Subfield Map" oils_persist:field_safe="true">
9582                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
9583                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9584                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
9585                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9586                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9587                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9588                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9589                 </fields>
9590                 <links>
9591                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
9592                 </links>
9593                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9594                         <actions>
9595                                 <retrieve/>
9596                         </actions>
9597                 </permacrud>
9598         </class>
9599
9600         <class id="cmpcvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_physical_characteristic_value_map" oils_persist:tablename="config.marc21_physical_characteristic_value_map" reporter:label="MARC21 Physical Characteristic Value Map" oils_persist:field_safe="true">
9601                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
9602                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9603                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
9604                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
9605                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9606                 </fields>
9607                 <links>
9608                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9609                 </links>
9610                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9611                         <actions>
9612                                 <retrieve/>
9613                         </actions>
9614                 </permacrud>
9615         </class>
9616
9617     <class
9618         id="uvs"
9619         controller="open-ils.cstore open-ils.pcrud"
9620         oils_obj:fieldmapper="url_verify::session"
9621         oils_persist:tablename="url_verify.session"
9622         reporter:label="URL Verification Session"
9623     >
9624         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
9625             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
9626             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9627                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
9628             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
9629             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
9630             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9631             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
9632             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
9633             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
9634         </fields>
9635
9636         <links>
9637             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9638             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9639             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
9640             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
9641             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
9642         </links>
9643
9644         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9645             <actions>
9646                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
9647             </actions>
9648         </permacrud>
9649
9650     </class>
9651
9652     <class id="uvsbrem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="url_verify::session_biblio_record_entry_map" oils_persist:readonly="true" reporter:label="URL Verify Session Biblio Record Entry Map">
9653         <oils_persist:source_definition>
9654             SELECT
9655                 cbrebi.id AS id,  -- so we can have a pkey in our view
9656                 uvs.id AS session,
9657                 uvs.owning_lib,
9658                 cbrebi.target_biblio_record_entry
9659             FROM url_verify.session uvs
9660             JOIN container.biblio_record_entry_bucket cbreb
9661                 ON (uvs.container = cbreb.id)
9662             JOIN container.biblio_record_entry_bucket_item cbrebi
9663                 ON (cbrebi.bucket = cbreb.id)
9664         </oils_persist:source_definition>
9665         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
9666             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
9667             <field reporter:label="Session" name="session" reporter:datatype="link" />
9668             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9669             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
9670         </fields>
9671         <links>
9672             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
9673             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
9674             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
9675         </links>
9676         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9677             <actions>
9678                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
9679             </actions>
9680         </permacrud>
9681     </class>
9682
9683     <class
9684         id="uvus"
9685         controller="open-ils.cstore open-ils.pcrud"
9686         oils_obj:fieldmapper="url_verify::url_selector"
9687         oils_persist:tablename="url_verify.url_selector"
9688         reporter:label="URL Verification URL Selector"
9689     >
9690         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
9691             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
9692             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
9693                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
9694             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
9695         </fields>
9696
9697         <links>
9698             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9699             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
9700         </links>
9701
9702         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9703             <actions>
9704                 <create permission="URL_VERIFY">
9705                     <context link="session" field="owning_lib"/>
9706                 </create>
9707                 <retrieve permission="URL_VERIFY">
9708                     <context link="session" field="owning_lib"/>
9709                 </retrieve>
9710                 <update permission="URL_VERIFY">
9711                     <context link="session" field="owning_lib"/>
9712                 </update>
9713                 <delete permission="URL_VERIFY">
9714                     <context link="session" field="owning_lib"/>
9715                 </delete>
9716             </actions>
9717         </permacrud>
9718
9719     </class>
9720
9721     <class
9722         id="uvu"
9723         controller="open-ils.cstore open-ils.pcrud"
9724         oils_obj:fieldmapper="url_verify::url"
9725         oils_persist:tablename="url_verify.url"
9726         reporter:label="URL Verification URL"
9727     >
9728         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
9729             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
9730                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
9731                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
9732                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
9733                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
9734             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9735             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9736             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
9737             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
9738             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
9739             <field reporter:label="Host" name="host" reporter:datatype="text"/>
9740             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
9741             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
9742             <field reporter:label="Path" name="path" reporter:datatype="text"/>
9743             <field reporter:label="Page" name="page" reporter:datatype="text"/>
9744             <field reporter:label="Query" name="query" reporter:datatype="text"/>
9745             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
9746             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
9747         </fields>
9748
9749         <links>
9750             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
9751             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
9752             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9753             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
9754             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
9755         </links>
9756
9757         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9758             <actions>
9759                 <create permission="URL_VERIFY">
9760                     <context link="session" field="owning_lib"/>
9761                 </create>
9762                 <retrieve permission="URL_VERIFY">
9763                     <context link="session" field="owning_lib"/>
9764                 </retrieve>
9765                 <update permission="URL_VERIFY">
9766                     <context link="session" field="owning_lib"/>
9767                 </update>
9768                 <delete permission="URL_VERIFY">
9769                     <context link="session" field="owning_lib"/>
9770                 </delete>
9771             </actions>
9772         </permacrud>
9773
9774     </class>
9775
9776     <class
9777         id="uvva"
9778         controller="open-ils.cstore open-ils.pcrud"
9779         oils_obj:fieldmapper="url_verify::verification_attempt"
9780         oils_persist:tablename="url_verify.verification_attempt"
9781         reporter:label="URL Verification Attempt"
9782     >
9783         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
9784             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
9785                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
9786                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
9787             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
9788             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
9789         </fields>
9790
9791         <links>
9792             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9793             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9794         </links>
9795
9796         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9797             <actions>
9798                 <create permission="URL_VERIFY">
9799                     <context link="session" field="owning_lib"/>
9800                 </create>
9801                 <retrieve permission="URL_VERIFY">
9802                     <context link="session" field="owning_lib"/>
9803                 </retrieve>
9804                 <update permission="URL_VERIFY">
9805                     <context link="session" field="owning_lib"/>
9806                 </update>
9807                 <delete permission="URL_VERIFY">
9808                     <context link="session" field="owning_lib"/>
9809                 </delete>
9810             </actions>
9811         </permacrud>
9812
9813     </class>
9814
9815     <class
9816         id="uvuv"
9817         controller="open-ils.cstore open-ils.pcrud"
9818         oils_obj:fieldmapper="url_verify::url_verification"
9819         oils_persist:tablename="url_verify.url_verification"
9820         reporter:label="URL Verification"
9821     >
9822         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
9823             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
9824                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
9825                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
9826             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
9827             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
9828             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
9829             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
9830                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
9831         </fields>
9832
9833         <links>
9834             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
9835             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
9836             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
9837         </links>
9838
9839         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9840             <actions>
9841                 <create permission="URL_VERIFY">
9842                     <context link="attempt" jump="session" field="owning_lib"/>
9843                 </create>
9844                 <retrieve permission="URL_VERIFY">
9845                     <context link="attempt" jump="session" field="owning_lib"/>
9846                 </retrieve>
9847                 <update permission="URL_VERIFY">
9848                     <context link="attempt" jump="session" field="owning_lib"/>
9849                 </update>
9850                 <delete permission="URL_VERIFY">
9851                     <context link="attempt" jump="session" field="owning_lib"/>
9852                 </delete>
9853             </actions>
9854         </permacrud>
9855
9856     </class>
9857
9858         <class
9859                 id="cfdi"
9860                 controller="open-ils.cstore open-ils.pcrud"
9861                 oils_obj:fieldmapper="config::filter_dialog_interface"
9862                 oils_persist:tablename="config.filter_dialog_interface"
9863                 reporter:label="FilterDialog Interface">
9864                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
9865                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
9866                         <field reporter:label="Description" name="description" reporter:datatype="text" />
9867                 </fields>
9868                 <links>
9869                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
9870                 </links>
9871                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9872                         <actions>
9873                                 <retrieve />
9874                         </actions>
9875                 </permacrud>
9876         </class>
9877
9878         <class
9879                 id="cfdfs"
9880                 controller="open-ils.cstore open-ils.pcrud"
9881                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
9882                 oils_persist:tablename="config.filter_dialog_filter_set"
9883                 reporter:label="FilterDialog Filter Set">
9884                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
9885                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9886                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9887                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9888                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9889                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
9890                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9891                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
9892                 </fields>
9893                 <links>
9894                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9895                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9896                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
9897                 </links>
9898                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9899                         <actions>
9900                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9901                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9902                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9903                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9904                         </actions>
9905                 </permacrud>
9906
9907         </class>
9908
9909         <class id="cmrtm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_rec_type_map" oils_persist:tablename="config.marc21_rec_type_map" reporter:label="MARC21 Record Type Map" oils_persist:field_safe="true">
9910                 <fields oils_persist:primary="code">
9911                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
9912                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
9913                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
9914                 </fields>
9915                 <links/>
9916                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9917                         <actions>
9918                                 <retrieve/>
9919                         </actions>
9920                 </permacrud>
9921         </class>
9922
9923         <class id="rlcd" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::last_copy_deleted" oils_persist:readonly="true" reporter:core="true" reporter:label="Last Copy Delete Time">
9924                 <oils_persist:source_definition>
9925
9926             SELECT  b.id,
9927                     MAX(dcp.edit_date) AS last_delete_date
9928              FROM   biblio.record_entry b
9929                     JOIN asset.call_number cn ON (cn.record = b.id)
9930                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
9931              WHERE  NOT b.deleted
9932              GROUP BY b.id
9933              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
9934
9935                 </oils_persist:source_definition>
9936                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9937                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
9938                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
9939                 </fields>
9940                 <links>
9941                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9942                 </links>
9943                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9944                         <actions>
9945                                 <retrieve/>
9946                         </actions>
9947                 </permacrud>
9948         </class>
9949
9950         <class id="rhcrpb" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::hold_copy_ratio_per_bib" oils_persist:readonly="true" reporter:core="true" reporter:label="Hold/Copy Ratio per Bib">
9951                 <oils_persist:source_definition>
9952
9953             -- -- If we uncomment the RIGHT JOIN against biblio.record_entry, then we'll get a row for every non-deleted bib, whether it has active holds or not.
9954             -- -- If we expect to use pcrud to query against specific bibs, we probably want to do this.  However, if we're using this to populate a report, we
9955             -- -- may not.
9956             -- SELECT
9957             --     bre.id AS "bib_id",
9958             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
9959             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
9960             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
9961             -- FROM (
9962                 SELECT
9963                     y.bre AS "id",
9964                     COALESCE( x.copy_count, 0 ) AS "copy_count",
9965                     y.hold_count AS "hold_count",
9966                     (y.hold_count::REAL / (CASE WHEN x.copy_count = 0 OR x.copy_count IS NULL THEN 0.1 ELSE x.copy_count::REAL END)) AS "hold_copy_ratio"
9967                 FROM (
9968                         SELECT
9969                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
9970                             COUNT(*) AS "hold_count"
9971                         FROM action.hold_request h
9972                         WHERE
9973                             cancel_time IS NULL
9974                             AND fulfillment_time IS NULL
9975                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
9976                         GROUP BY 1
9977                     )y LEFT JOIN (
9978                         SELECT 
9979                             (SELECT id
9980                                 FROM biblio.record_entry 
9981                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
9982                             ) AS "bre", 
9983                             COUNT(*) AS "copy_count"
9984                         FROM asset.copy
9985                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
9986                         WHERE copy.holdable 
9987                             AND NOT copy.deleted 
9988                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
9989                         GROUP BY 1
9990                     )x ON x.bre = y.bre
9991                 -- )z RIGHT JOIN (
9992                 --     SELECT id
9993                 --     FROM biblio.record_entry
9994                 --     WHERE NOT deleted
9995                 -- )bre ON (z.bib_id = bre.id)
9996                 
9997
9998                 </oils_persist:source_definition>
9999                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10000                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10001                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
10002                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
10003                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
10004                 </fields>
10005                 <links>
10006                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10007                 </links>
10008                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10009                         <actions>
10010                                 <retrieve/>
10011                         </actions>
10012                 </permacrud>
10013         </class>
10014
10015         <class id="rhcrpbap" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::hold_copy_ratio_per_bib_and_pickup" oils_persist:readonly="true" reporter:label="Hold/Copy Ratio per Bib and Pickup Library">
10016                 <oils_persist:source_definition>
10017             SELECT *,
10018                 CASE WHEN copy_count_at_pickup_library = 0 THEN 'Infinity'::FLOAT ELSE holds_at_pickup_library::FLOAT/copy_count_at_pickup_library END AS pickup_library_ratio,
10019                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10020             FROM
10021                 (SELECT bib_record as id, pickup_lib, count(DISTINCT ahr.id) AS holds_at_pickup_library, COALESCE(count(DISTINCT ac.id),0) as copy_count_at_pickup_library
10022                     FROM
10023                         action.hold_request ahr
10024                         JOIN reporter.hold_request_record rhrr USING (id)
10025                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10026                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10027                     WHERE
10028                         ahr.cancel_time IS NULL
10029                         AND ahr.fulfillment_time IS NULL
10030                     GROUP BY bib_record, pickup_lib
10031                 )x
10032                 JOIN
10033                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10034                     FROM
10035                         action.hold_request ahr
10036                         JOIN reporter.hold_request_record rhrr USING (id)
10037                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10038                     WHERE
10039                         ahr.cancel_time IS NULL
10040                         AND ahr.fulfillment_time IS NULL
10041                     GROUP BY bib_record
10042                 )y
10043                 USING (id)
10044                 </oils_persist:source_definition>
10045                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10046                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10047                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
10048                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
10049                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
10050                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10051                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10052                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
10053                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10054                 </fields>
10055                 <links>
10056                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10057                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
10058                 </links>
10059                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10060                         <actions>
10061                                 <retrieve/>
10062                         </actions>
10063                 </permacrud>
10064         </class>
10065
10066         <class id="rlc" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::last_circ_date" oils_persist:readonly="true" reporter:label="Last Circulation or Creation Date">
10067                 <oils_persist:source_definition>
10068             SELECT
10069                 ac.id,
10070                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
10071                 MAX(actac.xact_start) AS last_circ
10072             FROM asset.copy ac
10073                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10074             GROUP BY ac.id
10075
10076             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
10077             --SELECT
10078             --    ac.id,
10079             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
10080             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
10081             --FROM asset.copy ac
10082             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10083             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
10084             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
10085                 </oils_persist:source_definition>
10086                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10087                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
10088                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
10089                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
10090                 </fields>
10091                 <links>
10092                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10093                 </links>
10094                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10095                         <actions>
10096                                 <retrieve/>
10097                         </actions>
10098                 </permacrud>
10099         </class>
10100
10101         <class id="ctcl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::ts_config_list" oils_persist:tablename="config.ts_config_list" reporter:label="Text Search Configs">
10102                 <fields oils_persist:primary="id">
10103                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
10104                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
10105                 </fields>
10106                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10107                         <actions>
10108                                 <retrieve/>
10109                         </actions>
10110                 </permacrud>
10111         </class>
10112
10113         <class id="cmcts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_class_ts_map" oils_persist:tablename="config.metabib_class_ts_map" reporter:label="Metabib Class TS Map">
10114                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
10115                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10116                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
10117                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10118                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10119                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10120                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10121                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10122                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
10123                 </fields>
10124                 <links>
10125                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
10126                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10127                 </links>
10128                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10129                         <actions>
10130                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10131                                 <retrieve/>
10132                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10133                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10134                         </actions>
10135                 </permacrud>
10136         </class>
10137
10138         <class id="cmfts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_ts_map" oils_persist:tablename="config.metabib_field_ts_map" reporter:label="Metabib Field TS Map">
10139                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
10140                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10141                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
10142                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10143                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10144                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10145                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10146                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10147                 </fields>
10148                 <links>
10149                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
10150                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10151                 </links>
10152                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10153                         <actions>
10154                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10155                                 <retrieve/>
10156                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10157                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10158                         </actions>
10159                 </permacrud>
10160         </class>
10161
10162
10163         <!-- ********************************************************************************************************************* -->
10164         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
10165         <!-- ********************************************************************************************************************* -->
10166         <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">
10167                 <fields oils_persist:primary="id">
10168                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
10169                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
10170                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
10171                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10172                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
10173                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
10174                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10175                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
10176                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
10177                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
10178                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
10179                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
10180                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
10181                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
10182                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10183                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
10184                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
10185                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
10186                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
10187                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
10188                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
10189                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
10190                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
10191                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
10192                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
10193                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
10194                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
10195                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
10196                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
10197                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10198                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10199                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10200                 </fields>
10201                 <links>
10202                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10203                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
10204                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
10205                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
10206                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
10207                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
10208                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
10209                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
10210                 </links>
10211         </class>
10212
10213         <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">
10214                 <fields oils_persist:primary="id">
10215                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10216                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10217                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10218                 </fields>
10219                 <links>
10220                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10221                 </links>
10222         </class>
10223
10224         <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">
10225                 <fields oils_persist:primary="id">
10226                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10227                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10228                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10229                 </fields>
10230                 <links>
10231                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10232                 </links>
10233         </class>
10234
10235         <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">
10236                 <fields oils_persist:primary="id">
10237                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
10238
10239                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
10240                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
10241                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
10242
10243                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
10244                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
10245                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
10246
10247                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
10248                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
10249
10250                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10251                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
10252                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
10253
10254                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
10255                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
10256
10257                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
10258                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
10259                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
10260
10261                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
10262                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
10263                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
10264
10265                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10266                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
10267                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
10268                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
10269
10270                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
10271                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
10272
10273                 </fields>
10274                 <links>
10275                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
10276                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10277                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
10278                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
10279                 </links>
10280         </class>
10281
10282         <class id="acrlid" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_ready_lineitem_detail" oils_persist:readonly="true" reporter:label="Claim Ready Lineitem Details">
10283                 <oils_persist:source_definition>
10284
10285             SELECT
10286                 po.ordering_agency AS ordering_agency,
10287                 po.id AS purchase_order,
10288                 li.id AS lineitem,
10289                 lid.id AS lineitem_detail,
10290                 cpa.id AS claim_policy_action
10291             FROM
10292                 acq.lineitem_detail lid
10293                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
10294                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
10295                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
10296                 JOIN acq.claim_policy_action cpa ON (
10297                     cpa.claim_policy = cp.id
10298
10299                     -- we only care about claim policy actions whose claim
10300                     -- interval we'd reached or exceeded
10301                     AND (NOW() - cpa.action_interval) &gt; po.order_date
10302
10303                     -- filter out all claim policy actions where claim events
10304                     -- have occurred on or after the action's action_interval
10305                     AND NOT EXISTS (
10306                         SELECT 1
10307                         FROM
10308                             acq.claim_event evt
10309                             JOIN acq.claim claim ON (
10310                                 claim.id = evt.claim
10311                                 AND claim.lineitem_detail = lid.id
10312                             )
10313                         WHERE
10314                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
10315                     )
10316                 )
10317             WHERE
10318                 lid.cancel_reason IS NULL
10319                 AND li.cancel_reason IS NULL -- belt/suspenders
10320                 AND po.cancel_reason IS NULL -- belt/suspenders
10321                 AND lid.recv_time IS NULL
10322                 AND po.state = 'on-order'
10323             ORDER BY 1, 2, 3, 4, 5
10324
10325                 </oils_persist:source_definition>
10326                 <fields>
10327                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10328                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10329                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10330                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10331                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
10332                 </fields>
10333                 <links>
10334                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10335                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10336                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10337                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10338                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
10339                 </links>
10340         </class>
10341         <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary" oils_persist:tablename="acq.lineitem_summary">
10342                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10343                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10344                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10345                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10346                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10347                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10348                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10349                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10350                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10351                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10352                 </fields>
10353                 <links>
10354                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10355                 </links>
10356     </class>
10357         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
10358                 <oils_persist:source_definition>
10359             SELECT * FROM acq.lineitem_summary 
10360                                 WHERE item_count > (invoice_count + cancel_count)
10361         </oils_persist:source_definition>
10362                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10363                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10364                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10365                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10366                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10367                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10368                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10369                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10370                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10371                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10372                 </fields>
10373                 <links>
10374                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10375                 </links>
10376     </class>
10377         <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">
10378                 <oils_persist:source_definition>
10379
10380                         SELECT  t.*
10381                           FROM  action.transit_copy t
10382                                 JOIN actor.org_unit AS s ON (t.source = s.id)
10383                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
10384                           WHERE s.parent_ou &lt;&gt; d.parent_ou
10385
10386                 </oils_persist:source_definition>
10387                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
10388                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
10389                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
10390                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
10391                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
10392                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
10393                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
10394                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
10395                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
10396                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
10397                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
10398                 </fields>
10399                 <links>
10400                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
10401                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
10402                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
10403                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
10404                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10405                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
10406                 </links>
10407         </class>
10408
10409     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
10410                 <oils_persist:source_definition>
10411
10412         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
10413                 SELECT
10414                         cp.id as copy,
10415                         COUNT(circ.id),
10416                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10417                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10418                 FROM
10419                         asset.copy cp
10420                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
10421                 GROUP BY 1, 3, 4
10422                 UNION
10423                 SELECT
10424                         cp.id as copy,
10425                         COUNT(circ.id),
10426                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10427                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10428                 FROM
10429                         asset.copy cp
10430                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
10431                 GROUP BY 1, 3, 4
10432                 UNION
10433                 SELECT
10434                         id as copy,
10435                         circ_count,
10436                         -1 AS year,
10437                         false as is_renewal
10438                 FROM
10439                         extend_reporter.legacy_circ_count
10440         )x GROUP BY 1, 3, 4
10441
10442                 </oils_persist:source_definition>
10443         <fields>
10444             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
10445             <field reporter:label="Count" name="count" reporter:datatype="int"/>
10446             <field reporter:label="Year" name="year" reporter:datatype="int"/>
10447             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
10448         </fields>
10449                 <links>
10450                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
10451                 </links>
10452                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10453                         <actions>
10454                                 <retrieve/>
10455                         </actions>
10456                 </permacrud>
10457     </class>
10458
10459         <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">
10460                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
10461                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
10462                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
10463                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
10464                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
10465                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
10466                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
10467                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
10468                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
10469                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
10470                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
10471                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
10472                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
10473                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
10474                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
10475                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
10476                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
10477                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
10478                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
10479                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
10480                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
10481                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
10482                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
10483                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
10484                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
10485                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
10486                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
10487                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
10488                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
10489                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
10490                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
10491                 </fields>
10492                 <links>
10493                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
10494                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
10495                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
10496                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10497                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
10498                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10499                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10500                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
10501                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
10502                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
10503                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
10504                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
10505                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
10506                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
10507                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
10508                 </links>
10509         </class>
10510
10511     <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">
10512         <fields oils_persist:primary="id">
10513             <field reporter:label="Title" name="title" reporter:datatype="text"/>
10514             <field reporter:label="Author" name="author" reporter:datatype="text"/>
10515             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
10516             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
10517             <field reporter:label="Price" name="price" reporter:datatype="money"/>
10518             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10519             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
10520             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
10521             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10522             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
10523             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10524             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
10525             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
10526             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
10527             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10528             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10529             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
10530             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
10531             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
10532             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
10533             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
10534             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
10535             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10536             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
10537             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
10538             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
10539             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
10540             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
10541             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
10542             <field reporter:label="Status" name="status" reporter:datatype="link"/>
10543             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
10544             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
10545             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
10546             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
10547         </fields>
10548         <links>
10549             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10550             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10551             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10552             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
10553             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
10554         </links>
10555     </class>
10556
10557     <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">
10558         <fields oils_persist:primary="id">
10559             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10560             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10561             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10562             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10563         </fields>
10564         <links>
10565             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10566             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10567         </links>
10568     </class>
10569
10570     <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">
10571         <fields oils_persist:primary="owning_lib">
10572             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10573             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10574             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10575         </fields>
10576         <links>
10577             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10578         </links>
10579     </class>
10580
10581     <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">
10582         <fields oils_persist:primary="id">
10583             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10584             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10585             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10586             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10587             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10588         </fields>
10589         <links>
10590             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10591             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10592             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10593         </links>
10594     </class>
10595
10596     <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">
10597         <fields oils_persist:primary="circ_lib">
10598             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10599             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10600             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10601             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10602         </fields>
10603         <links>
10604             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10605             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10606         </links>
10607     </class>
10608
10609     <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">
10610         <fields oils_persist:primary="id">
10611             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10612             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10613             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10614             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10615             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10616         </fields>
10617         <links>
10618             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10619             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10620             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10621         </links>
10622     </class>
10623
10624     <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">
10625         <fields oils_persist:primary="home_ou">
10626             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10627             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10628             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10629             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10630         </fields>
10631         <links>
10632             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10633             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10634         </links>
10635     </class>
10636         <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">
10637                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
10638                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
10639                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
10640                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
10641                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
10642                 </fields>
10643                 <links>
10644                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10645                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
10646                 </links>
10647                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10648                         <actions>
10649                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10650                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
10651                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10652                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10653                         </actions>
10654                 </permacrud>
10655         </class>
10656         <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">
10657                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
10658                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
10659                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
10660                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
10661                 </fields>
10662                 <links>
10663                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10664                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
10665                         </links>
10666                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10667                 <actions>
10668                                 <create permission="ADMIN_ACQ_FUND_TAG">
10669                                         <context link="tag" field="owner"/>
10670                                 </create>
10671                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
10672                                         <context link="tag" field="owner"/>
10673                                 </retrieve>
10674                                 <update permission="ADMIN_ACQ_FUND_TAG">
10675                                         <context link="tag" field="owner"/>
10676                                 </update>
10677                                 <delete permission="ADMIN_ACQ_FUND_TAG">
10678                                         <context link="tag" field="owner"/>
10679                                 </delete>
10680                         </actions>
10681                 </permacrud>
10682         </class>
10683         <class id="acqmapinv" controller="open-ils.cstore" oils_obj:fieldmapper="acq::map_to_invoice" reporter:label="Acq Map to Invoice View" oils_persist:readonly="true">
10684                 <oils_persist:source_definition><![CDATA[
10685                 SELECT
10686                         poi.purchase_order AS purchase_order,
10687                         ii.invoice AS invoice,
10688                         NULL AS lineitem,
10689                         poi.id AS po_item,
10690                         NULL AS picklist
10691                 FROM
10692                         acq.po_item poi
10693                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
10694                 UNION SELECT
10695                         jub.purchase_order AS purchase_order,
10696                         ie.invoice AS invoice,
10697                         jub.id AS lineitem,
10698                         NULL AS po_item,
10699                         jub.picklist AS picklist
10700                 FROM
10701                         acq.lineitem jub
10702                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
10703                 UNION SELECT
10704                         ii.purchase_order AS purchase_order,
10705                         ii.invoice AS invoice,
10706                         NULL AS lineitem,
10707                         NULL AS po_item,
10708                         NULL AS picklist
10709                 FROM
10710                         acq.invoice_item ii
10711                 WHERE ii.po_item IS NULL
10712                 UNION SELECT
10713                         ie.purchase_order AS purchase_order,
10714                         ie.invoice AS invoice,
10715                         NULL AS lineitem,
10716                         NULL AS po_item,
10717                         NULL AS picklist
10718                 FROM
10719                         acq.invoice_entry ie
10720                 WHERE ie.lineitem IS NULL
10721                 UNION SELECT
10722                         NULL AS purchase_order,
10723                         NULL AS invoice,
10724                         jub.id AS lineitem,
10725                         NULL AS po_item,
10726                         jub.picklist AS picklist
10727                 FROM
10728                         acq.lineitem jub
10729                 WHERE jub.purchase_order IS NULL
10730                 ]]></oils_persist:source_definition>
10731                 <fields>
10732                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
10733                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
10734                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
10735                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
10736                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
10737                 </fields>
10738                 <links>
10739                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
10740                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
10741                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
10742                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
10743                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
10744                 </links>
10745         </class>
10746         <class id="cbc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::barcode_completion" oils_persist:tablename="config.barcode_completion" reporter:label="Barcode Completions">
10747                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
10748                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10749                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
10750                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
10751                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
10752                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
10753                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10754                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
10755                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
10756                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
10757                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
10758                 </fields>
10759                 <links>
10760                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10761                 </links>
10762                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10763                         <actions>
10764                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10765                                 <retrieve/>
10766                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10767                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10768                         </actions>
10769                 </permacrud>
10770         </class>
10771
10772         <class id="coustl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::org_unit_setting_type_log" oils_persist:tablename="config.org_unit_setting_type_log" reporter:label="Organizational Unit Setting Type Log">
10773                 <fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
10774                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10775                         <field name="date_applied" reporter:datatype="timestamp"/>
10776                         <field name="org" reporter:datatype="org_unit"/>
10777                         <field name="original_value" reporter:datatype="text"/>
10778                         <field name="new_value" reporter:datatype="text"/>
10779                         <field name="field_name" reporter:datatype="link"/>
10780                 </fields>
10781                 <links>
10782                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
10783                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
10784                 </links>
10785                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10786                         <actions>
10787                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
10788                                 <retrieve/>
10789                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10790                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10791                         </actions>
10792                 </permacrud>
10793         </class>
10794         <class id="aaactsc" controller="open-ils.reporter-store" oils_obj:fieldmapper="action::archive_actor_stat_cat" oils_persist:tablename="action.archive_actor_stat_cat" reporter:label="Circ-Archived Patron Statistical Category Entries">
10795                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10796                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10797                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10798                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10799                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10800                 </fields>
10801                 <links>
10802                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10803                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
10804                 </links>
10805         </class>
10806         <class id="aaasc" controller="open-ils.reporter-store" oils_obj:fieldmapper="action::archive_asset_stat_cat" oils_persist:tablename="action.archive_asset_stat_cat" reporter:label="Circ-Archived Copy Statistical Category Entries">
10807                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10808                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10809                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10810                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10811                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10812                 </fields>
10813                 <links>
10814                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10815                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
10816                 </links>
10817         </class>
10818
10819
10820         <!-- ********************************************************************************************************************* -->
10821
10822 </IDL>
10823
10824 <!--
10825     vim:noet:ts=4:sw=4:
10826 -->