]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
LP 1198465: Load negative balance test transactions in load_all.sql
[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                         <field name="account_adjustment" oils_persist:virtual="true" />
85                 </fields>
86                 <links>
87                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
88                 </links>
89         </class>
90
91         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
92                 <fields>
93                         <field name="workstation" oils_persist:virtual="true" />
94                         <field name="cash_payment" oils_persist:virtual="true" />
95                         <field name="check_payment" oils_persist:virtual="true" />
96                         <field name="credit_card_payment" oils_persist:virtual="true" />
97                 </fields>
98                 <links>
99                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
100                 </links>
101         </class>
102
103         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
104                 <fields>
105                         <field name="id" oils_persist:virtual="true" />
106                         <field name="children" oils_persist:virtual="true" />
107                         <field name="owner_doc" oils_persist:virtual="true" />
108                         <field name="intra_doc_id" oils_persist:virtual="true" />
109                         <field name="parent_node" oils_persist:virtual="true" />
110                         <field name="node_type" oils_persist:virtual="true" />
111                         <field name="namespace_uri" oils_persist:virtual="true" />
112                         <field name="name" oils_persist:virtual="true" />
113                         <field name="value" oils_persist:virtual="true" />
114                 </fields>
115         </class>
116
117         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
118                 <fields>
119                         <field name="title" oils_persist:virtual="true" />
120                         <field name="author" oils_persist:virtual="true" />
121                         <field name="doc_id" oils_persist:virtual="true" />
122                         <field name="doc_type" oils_persist:virtual="true" />
123                         <field name="pubdate" oils_persist:virtual="true" />
124                         <field name="isbn" oils_persist:virtual="true" />
125                         <field name="publisher" oils_persist:virtual="true" />
126                         <field name="tcn" oils_persist:virtual="true" />
127                         <field name="subject" oils_persist:virtual="true" />
128                         <field name="types_of_resource" oils_persist:virtual="true" />
129                         <field name="call_numbers" oils_persist:virtual="true" />
130                         <field name="edition" oils_persist:virtual="true" />
131                         <field name="online_loc" oils_persist:virtual="true" />
132                         <field name="synopsis" oils_persist:virtual="true" />
133                         <field name="physical_description" oils_persist:virtual="true" />
134                         <field name="toc" oils_persist:virtual="true" />
135                         <field name="copy_count" oils_persist:virtual="true" />
136                         <field name="series" oils_persist:virtual="true" />
137                         <field name="serials" oils_persist:virtual="true" />
138                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
139                 </fields>
140         </class>
141
142         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
143                 <fields>
144                         <field name="err_msg" oils_persist:virtual="true" />
145                         <field name="type" oils_persist:virtual="true" />
146                 </fields>
147         </class>
148
149         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
150                 <fields>
151                         <field name="err_msg" oils_persist:virtual="true" />
152                         <field name="type" oils_persist:virtual="true" />
153                 </fields>
154         </class>
155
156         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
157                 <fields oils_persist:primary="matchpoint">
158                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
159                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
160                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
161                 </fields>
162                 <links>
163                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
164                 </links>
165         </class>
166
167         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
168         <!-- when the time is right, turn me into a view.  -->
169                 <fields>
170             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
171             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
172             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
173             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
174             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
175             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
176             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
177             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
178             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
179             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
180                 </fields>
181         </class>
182
183         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
184                 <fields>
185                         <field name="public_name" oils_persist:virtual="true" />
186                         <field name="target_url" oils_persist:virtual="true" />
187                         <field name="target_coverage" oils_persist:virtual="true" />
188                         <field name="target_embargo" oils_persist:virtual="true" />
189                 </fields>
190         </class>
191
192         <!-- Actually in the DB -->
193         <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">
194                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
195                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
196                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
197                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
198                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
199                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
200                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
201                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
202                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
203                 </fields>
204                 <links>
205                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
206                 </links>
207                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
208                         <actions>
209                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
210                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
211                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
212                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
213                         </actions>
214                 </permacrud>
215         </class>
216
217         <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">
218                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
219                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
220                         <field reporter:label="Group" name="grp" reporter:datatype="link"/>
221                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
222                 </fields>
223                 <links>
224                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
225                 </links>
226                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
227                         <actions>
228                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
229                     <context link="grp" field="owner"/>
230                 </create>
231                                 <retrieve/>
232                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
233                     <context link="grp" field="owner"/>
234                 </update>
235                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
236                     <context link="grp" field="owner"/>
237                 </delete>
238                         </actions>
239                 </permacrud>
240         </class>
241
242         <class  id="vibtg" 
243             controller="open-ils.cstore open-ils.pcrud" 
244             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
245             oils_persist:tablename="vandelay.import_bib_trash_group" 
246             reporter:label="Import/Overlay Field Groups for Removal">
247                 <fields oils_persist:primary="id" 
248                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
249                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
250                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
251                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
252                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
253                 </fields>
254                 <links>
255                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
256                 </links>
257                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
258                         <actions>
259                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
260                                 <retrieve/>
261                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
262                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
263                         </actions>
264                 </permacrud>
265         </class>
266
267
268         <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">
269                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
270                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
271                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
272                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
273                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
274                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
275                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
276                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
277                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
278                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
279                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
280                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
281                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
282                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
283                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
284                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
285                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
286                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
287                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
288                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
289                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
290                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
291                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
292                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
293                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
294                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
295                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
296                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
297                 </fields>
298                 <links>
299                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
300                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
301                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
302                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
303                 </links>
304                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
305                         <actions>
306                                 <create permission="CREATE_IMPORT_ITEM">
307                     <context link="definition" field="owner"/>
308                                 </create>
309                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
310                     <context link="definition" field="owner"/>
311                                 </retrieve>
312                                 <update permission="UPDATE_IMPORT_ITEM">
313                     <context link="definition" field="owner"/>
314                                 </update>
315                                 <delete permission="DELETE_IMPORT_ITEM">
316                     <context link="definition" field="owner"/>
317                                 </delete>
318                         </actions>
319                 </permacrud>
320         </class>
321
322         <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">
323                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
324                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
325                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
326                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
327                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
328                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
329                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
330                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
331                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
332                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
333                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
334                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
335                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
336                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
337                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
338                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
339                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
340                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
341                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
342                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
343                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
344                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
345                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
346                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
347                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
348                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
349                 </fields>
350                 <links>
351                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
352                 </links>
353                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
354                         <actions>
355                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
356                                 <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"/>
357                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
358                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
359                         </actions>
360                 </permacrud>
361         </class>
362
363         <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">
364                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
365                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
366                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
367                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
368                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
369                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
370                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
371                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
372                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
373                 </fields>
374                 <links>
375                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
376                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
377                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
378                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
379                 </links>
380                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
381                         <actions>
382                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
383                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
384                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
385                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
386                         </actions>
387                 </permacrud>
388         </class>
389
390         <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">
391                 <fields oils_persist:primary="code">
392                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
393                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
394                 </fields>
395                 <links>
396                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
397                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
398                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
399                 </links>
400                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
401                         <actions>
402                                 <retrieve/>
403                         </actions>
404                 </permacrud>
405         </class>
406
407         <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">
408                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
409                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
410                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
411                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
412                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
413                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
414                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
415                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
416                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
417                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
418                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
419                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
420                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
421                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
422                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
423                 </fields>
424                 <links>
425                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
426                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
427                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
428                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
429             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
430             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
431             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
432                 </links>
433                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
434                         <actions>
435                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
436                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
437                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
438                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
439                         </actions>
440                 </permacrud>
441         </class>
442
443         <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">
444                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
445                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
446                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
447                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
448                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
449                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
450                 </fields>
451                 <links/>
452                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
453                         <actions>
454                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
455                 <retrieve/>
456                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
457                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
458                         </actions>
459                 </permacrud>
460         </class>
461
462         <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">
463                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
464                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
465                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
466                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
467                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
468                 </fields>
469                 <links>
470                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
471                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
472                 </links>
473                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
474                         <actions>
475                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
476                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
477                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
478                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
479                         </actions>
480                 </permacrud>
481         </class>
482
483         <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">
484                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
485                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
486                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
487                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
488                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
489                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
490                 </fields>
491                 <links>
492                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
493                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
494                 </links>
495                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
496                         <actions>
497                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
498                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
499                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
500                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
501                         </actions>
502                 </permacrud>
503         </class>
504
505         <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">
506                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
507                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
508                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
509                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
510                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
511                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
512                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
513                 </fields>
514                 <links>
515                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
516                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
517                 </links>
518                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
519                         <actions>
520                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
521                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
522                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
523                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
524                         </actions>
525                 </permacrud>
526         </class>
527
528         <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">
529                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
530                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
531                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
532                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
533                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
534                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
535                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
536                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
537                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
538                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
539                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
540                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
541                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
542                 </fields>
543                 <links>
544                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
545                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
546                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
547             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
548             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
549                 </links>
550                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
551                         <actions>
552                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
553                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
554                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
555                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
556                         </actions>
557                 </permacrud>
558         </class>
559
560         <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">
561                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
562                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
563                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
564                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
565                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
566                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
567                 </fields>
568                 <links/>
569                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
570                         <actions>
571                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
572                 <retrieve/>
573                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
574                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
575                         </actions>
576                 </permacrud>
577         </class>
578
579         <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">
580                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
581                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
582                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
583                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
584                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
585                 </fields>
586                 <links>
587                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
588                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
589                 </links>
590                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
591                         <actions>
592                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
593                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
594                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
595                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
596                         </actions>
597                 </permacrud>
598         </class>
599
600         <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">
601                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
602                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
603                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
604                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
605                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
606                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
607                 </fields>
608                 <links>
609                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
610                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
611                 </links>
612                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
613                         <actions>
614                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
615                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
616                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
617                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
618                         </actions>
619                 </permacrud>
620         </class>
621
622         <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">
623                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
624                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
625                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
626                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
627                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
628                 </fields>
629                 <links>
630                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
631                 </links>
632                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
633                         <actions>
634                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
635                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
636                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
637                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
638                         </actions>
639                 </permacrud>
640         </class>
641
642         <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">
643                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
644                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
645                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
646                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
647                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
648                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
649                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
650                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
651             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
652                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
653                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
654                         <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>
655                 </fields>
656                 <links>
657                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
658                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
659                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
660                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
661                 </links>
662                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
663                         <actions>
664                                 <create permission="ADMIN_IMPORT_MATCH_SET">
665                     <context link="match_set" field="owner"/>
666                                 </create>
667                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
668                     <context link="match_set" field="owner"/>
669                                 </retrieve>
670                                 <update permission="ADMIN_IMPORT_MATCH_SET">
671                     <context link="match_set" field="owner"/>
672                                 </update>
673                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
674                     <context link="match_set" field="owner"/>
675                                 </delete>
676                         </actions>
677                 </permacrud>
678         </class>
679
680         <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">
681                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
682                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
683                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
684                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
685                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
686                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
687                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
688                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
689                 </fields>
690                 <links>
691                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
692                 </links>
693                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
694                         <actions>
695                                 <create permission="ADMIN_IMPORT_MATCH_SET">
696                     <context link="match_set" field="owner"/>
697                                 </create>
698                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
699                     <context link="match_set" field="owner"/>
700                                 </retrieve>
701                                 <update permission="ADMIN_IMPORT_MATCH_SET">
702                     <context link="match_set" field="owner"/>
703                                 </update>
704                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
705                     <context link="match_set" field="owner"/>
706                                 </delete>
707                         </actions>
708                 </permacrud>
709         </class>
710
711         <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">
712                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
713                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
714                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
715                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
716                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
717                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
718                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
719                 </fields>
720                 <links>
721                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
722                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
723                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
724                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
725                 </links>
726         </class>
727
728     <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">
729         <fields oils_persist:primary="name">
730             <field reporter:label="Name" name="name" reporter:datatype="text"/>
731             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
732             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
733             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
734         </fields>
735         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
736             <actions>
737                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
738                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
739                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
740                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
741             </actions>
742         </permacrud>
743     </class>
744
745     <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">
746         <fields oils_persist:primary="id">
747             <field reporter:label="ID" name="id" reporter:datatype="id"/>
748             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
749             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
750             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
751             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
752         </fields>
753         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
754             <actions>
755                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
756                 <retrieve/>
757                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
758                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
759             </actions>
760         </permacrud>
761     </class>
762
763         <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">
764                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
765                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
766                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
767                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
768                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
769                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
770                 </fields>
771                 <links>
772                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
773                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
774                 </links>
775         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
776             <actions>
777                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
778                 <retrieve/>
779                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
780                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
781             </actions>
782         </permacrud>
783         </class>
784
785         <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">
786                 <fields oils_persist:primary="name">
787                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
788                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
789                         <field reporter:label="Description" name="description" reporter:datatype="text" />
790                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
791                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
792                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
793                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
794                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
795                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
796                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
797                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
798                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
799                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
800                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
801                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
802                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
803                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
804                 </fields>
805                 <links>
806                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
807                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
808                 </links>
809         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
810             <actions>
811                 <create permission="ADMIN_SVF" global_required="true"/>
812                 <retrieve/>
813                 <update permission="ADMIN_SVF" global_required="true"/>
814                 <delete permission="ADMIN_SVF" global_required="true"/>
815             </actions>
816         </permacrud>
817         </class>
818
819         <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">
820                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
821                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
822                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
823                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
824             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
825                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
826                 </fields>
827                 <links/>
828         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
829             <actions>
830                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
831                 <retrieve/>
832                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
833                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
834             </actions>
835         </permacrud>
836         </class>
837
838         <class id="ccraed" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::composite_attr_entry_definition" oils_persist:tablename="config.composite_attr_entry_definition" reporter:label="Composite Attribute Definitions" oils_persist:field_safe="true">
839                 <fields oils_persist:primary="coded_value">
840                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
841                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
842                 </fields>
843                 <links>
844                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
845                 </links>
846         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
847             <actions>
848                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
849                 <retrieve/>
850                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
851                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
852             </actions>
853         </permacrud>
854         </class>
855
856         <class id="murav" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::uncontrolled_record_attr_value" oils_persist:tablename="metabib.uncontrolled_record_attr_value" reporter:label="Uncontrolled Record Attribute Values" oils_persist:field_safe="true">
857                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
858                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
859                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
860                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
861                 </fields>
862                 <links>
863                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
864                 </links>
865         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
866             <actions>
867                 <retrieve/>
868             </actions>
869         </permacrud>
870         </class>
871
872
873         <class id="mrs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_sorter" oils_persist:tablename="metabib.record_sorter" reporter:label="Record Sort Values" oils_persist:field_safe="true">
874                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
875                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
876                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
877                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
878                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
879                 </fields>
880                 <links>
881                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
882                         <link field="attr" 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                 <retrieve/>
887             </actions>
888         </permacrud>
889         </class>
890
891
892         <class id="mravl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_vector_list" oils_persist:tablename="metabib.record_attr_vector_list" reporter:label="MVF Record Attribute Vectors" oils_persist:field_safe="true">
893                 <fields oils_persist:primary="source">
894                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
895                         <field reporter:label="Vector" name="vlist" reporter:datatype="text"  oils_obj:required="true"/> <!-- Actually an int[], but this is the best we can do in fm_IDL.xml -->
896                 </fields>
897                 <links>
898                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
899                 </links>
900         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
901             <actions>
902                 <retrieve/>
903             </actions>
904         </permacrud>
905         </class>
906
907         <class id="mraf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_flat" oils_persist:tablename="metabib.record_attr_flat" reporter:label="MVF Record Attribute Flat List" oils_persist:field_safe="true">
908                 <fields>
909                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
910                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
911                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
912                 </fields>
913                 <links>
914                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
915                 </links>
916         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
917             <actions>
918                 <retrieve/>
919             </actions>
920         </permacrud>
921         </class>
922
923         <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" oils_persist:readonly="true">
924                 <fields oils_persist:primary="id">
925                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
926                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
927                 </fields>
928                 <links>
929                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
930                 </links>
931         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
932             <actions>
933                 <retrieve/>
934             </actions>
935         </permacrud>
936         </class>
937
938         <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">
939                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
940                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
941                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
942                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
943                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
944                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
945                 </fields>
946                 <links>
947                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
948                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
949                 </links>
950         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
951             <actions>
952                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
953                 <retrieve/>
954                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
955                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
956             </actions>
957         </permacrud>
958         </class>
959
960         <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">
961                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
962                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
963                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
964                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
965                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
966                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
967                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
968                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
969             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
970             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
971                 </fields>
972                 <links>
973                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
974                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
975                 </links>
976         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
977             <actions>
978                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
979                 <retrieve/>
980                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
981                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
982             </actions>
983         </permacrud>
984         </class>
985
986         <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">
987                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
988                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
989                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
990                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
991                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
992                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
993                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
994                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
995                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
996                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
997                 </fields>
998                 <links>
999                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1000                 </links>
1001         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1002             <actions>
1003                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1004                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1005                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1006                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1007             </actions>
1008         </permacrud>
1009         </class>
1010
1011     <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">
1012         <fields oils_persist:primary="name">
1013             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1014             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1015             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1016             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1017             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1018             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1019             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1020             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1021             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
1022             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1023         </fields>
1024         <links>
1025             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1026             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1027         </links>
1028         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1029             <actions>
1030                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1031                 <retrieve/>
1032                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1033                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1034             </actions>
1035         </permacrud>
1036     </class>
1037
1038     <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">
1039         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1040             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1041             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
1042             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1043             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1044             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1045             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1046             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1047         </fields>
1048         <links>
1049             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1050         </links>
1051         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1052             <actions>
1053                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1054                 <retrieve/>
1055                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1056                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1057             </actions>
1058         </permacrud>
1059     </class>
1060
1061     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1062                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1063                         oils_persist:tablename="config.z3950_index_field_map" 
1064                         reporter:label="Z39.50 Index Field Map">
1065         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1066             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1067             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1068             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1069             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1070             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1071             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1072         </fields>
1073         <links>
1074             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1075             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1076             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1077         </links>
1078         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1079             <actions>
1080                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1081                 <retrieve/>
1082                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1083                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1084             </actions>
1085         </permacrud>
1086     </class>
1087
1088
1089         <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">
1090                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1091                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1092                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1093                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1094                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1095                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1096                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1097                 </fields>
1098                 <links>
1099             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1100             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1101                 </links>
1102                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1103                         <actions>
1104                                 <retrieve/>
1105                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1106                         </actions>
1107                 </permacrud>
1108         </class>
1109
1110         <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">
1111                 <fields oils_persist:primary="key">
1112                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
1113                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1114                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1115                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1116                 </fields>
1117                 <links/>
1118                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1119                         <actions>
1120                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1121                                 <retrieve/>
1122                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1123                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1124                         </actions>
1125                 </permacrud>
1126         </class>
1127
1128         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1129                 <fields oils_persist:primary="module">
1130                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1131                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1132                 </fields>
1133                 <links/>
1134         </class>
1135
1136         <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">
1137                 <fields oils_persist:primary="module">
1138                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1139                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1140                 </fields>
1141                 <links/>
1142                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1143                         <actions>
1144                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1145                                 <retrieve/>
1146                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1147                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1148                         </actions>
1149                 </permacrud>
1150         </class>
1151
1152         <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">
1153                 <fields oils_persist:primary="module">
1154                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1155                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1156                 </fields>
1157                 <links/>
1158                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1159                         <actions>
1160                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1161                                 <retrieve/>
1162                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1163                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1164                         </actions>
1165                 </permacrud>
1166         </class>
1167
1168         <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">
1169                 <fields oils_persist:primary="module">
1170                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1171                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1172                 </fields>
1173                 <links/>
1174                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1175                         <actions>
1176                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1177                                 <retrieve/>
1178                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1179                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1180                         </actions>
1181                 </permacrud>
1182         </class>
1183
1184         <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">
1185                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1186                         <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>
1187                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1188                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1189                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1190                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1191                 </fields>
1192                 <links>
1193                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1194                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1195                 </links>
1196                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1197                         <actions>
1198                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1199                     <context link="event_def" field="owner"/>
1200                 </create>
1201                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1202                     <context link="event_def" field="owner"/>
1203                 </retrieve>
1204                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1205                     <context link="event_def" field="owner"/>
1206                 </update>
1207                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1208                     <context link="event_def" field="owner"/>
1209                 </delete>
1210                         </actions>
1211                 </permacrud>
1212         </class>
1213
1214         <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">
1215                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1216                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1217                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1218                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1219                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1220                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1221                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1222                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1223                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1224                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1225                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1226                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1227                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1228                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1229                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1230                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1231                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1232                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1233                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1234                         <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>
1235                         <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
1236                         <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
1237                         <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
1238                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1239                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1240                 </fields>
1241                 <links>
1242                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1243                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1244                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1245                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1246                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1247                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1248                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1249                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1250                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1251                 </links>
1252                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1253                         <actions>
1254                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1255                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1256                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1257                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1258                         </actions>
1259                 </permacrud>
1260         </class>
1261
1262         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1263                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1264                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1265                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1266                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1267                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1268                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1269                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1270                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1271                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1272                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1273                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1274                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1275                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1276                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1277                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1278                 </fields>
1279                 <links>
1280                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1281                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1282                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1283                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1284                 </links>
1285         </class>
1286
1287         <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">
1288                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1289                         <field reporter:label="Parameter ID" name="id" reporter:datatype="id"/>
1290                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1291                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1292                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1293                 </fields>
1294                 <links>
1295                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1296                 </links>
1297                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1298                         <actions>
1299                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1300                     <context link="event_def" field="owner"/>
1301                 </create>
1302                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1303                     <context link="event_def" field="owner"/>
1304                 </retrieve>
1305                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1306                     <context link="event_def" field="owner"/>
1307                 </update>
1308                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1309                     <context link="event_def" field="owner"/>
1310                 </delete>
1311                         </actions>
1312                 </permacrud>
1313         </class>
1314
1315         <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">
1316                 <oils_persist:source_definition><![CDATA[
1317                 SELECT  atevdef.hook,
1318                         atevdef.name,
1319                         atevdef.reactor,
1320                         atev.id,
1321                         atev.event_def,
1322                         atev.add_time,
1323                         atev.run_time,
1324                         atev.start_time,
1325                         atev.update_time,
1326                         atev.complete_time,
1327                         atev.update_process,
1328                         atev.state,
1329                         atev.user_data,
1330                         atev.template_output,
1331                         atev.error_output,
1332                         atev.async_output,
1333                         targ_circ.id AS target_circ,
1334                         targ_ahr.id AS target_hold,
1335                         COALESCE(
1336                                 targ_circ.circ_lib,
1337                                 targ_ahr.pickup_lib
1338                         ) AS perm_lib
1339                 FROM action_trigger.event atev
1340                 JOIN action_trigger.event_definition atevdef ON
1341                         (atevdef.id = atev.event_def)
1342                 JOIN action_trigger.hook ath ON
1343                         (ath.key = atevdef.hook)
1344                 LEFT JOIN action.circulation targ_circ ON
1345                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1346                 LEFT JOIN action.hold_request targ_ahr ON
1347                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1348                 WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
1349                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1350                                 'circ.staff.max_visible_event_age',
1351                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1352                         ) UNION
1353                         SELECT '1000 YEARS'::INTERVAL AS value
1354                 ) ous)
1355                 ]]></oils_persist:source_definition>
1356                 <fields oils_persist:primary="id">
1357                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1358                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1359                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1360                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1361                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1362                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1363                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1364                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1365                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1366                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1367                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1368                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1369                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1370                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1371                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1372                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1373                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1374                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1375                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1376                 </fields>
1377                 <links>
1378                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1379                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1380                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1381                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1382                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1383                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1384                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1385                 </links>
1386                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1387                         <actions>
1388                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1389                         </actions>
1390                 </permacrud>
1391         </class>
1392
1393         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1394                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1395                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1396                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1397                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1398                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1399                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1400                 </fields>
1401                 <links>
1402                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1403                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1404                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1405                 </links>
1406                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1407                         <actions>
1408                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1409                         </actions>
1410                 </permacrud>
1411         </class>
1412
1413         <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">
1414                 <fields oils_persist:primary="code">
1415                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1416                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1417                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1418                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1419                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1420                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1421                 </fields>
1422                 <links/>
1423         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1424             <actions>
1425                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1426                 <retrieve/>
1427                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1428                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1429             </actions>
1430         </permacrud>
1431         </class>
1432
1433         <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">
1434                 <fields oils_persist:primary="code">
1435                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1436                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1437                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1438                 </fields>
1439                 <links/>
1440         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1441             <actions>
1442                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1443                 <retrieve/>
1444                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1445                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1446             </actions>
1447         </permacrud>
1448         </class>
1449
1450         <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">
1451                 <fields oils_persist:primary="code">
1452                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1453                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1454                 </fields>
1455                 <links/>
1456         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1457             <actions>
1458                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1459                 <retrieve/>
1460                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1461                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1462             </actions>
1463         </permacrud>
1464         </class>
1465
1466         <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">
1467                 <fields oils_persist:primary="code">
1468                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1469                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1470                 </fields>
1471                 <links/>
1472         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1473             <actions>
1474                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1475                 <retrieve/>
1476                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1477                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1478             </actions>
1479         </permacrud>
1480         </class>
1481
1482         <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">
1483                 <fields oils_persist:primary="code">
1484                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1485                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1486                 </fields>
1487                 <links/>
1488         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1489             <actions>
1490                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1491                 <retrieve/>
1492                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1493                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1494             </actions>
1495         </permacrud>
1496         </class>
1497
1498         <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">
1499                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1500                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1501                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1502                 </fields>
1503                 <links/>
1504         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1505             <actions>
1506                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1507                 <retrieve/>
1508                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1509                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1510             </actions>
1511         </permacrud>
1512         </class>
1513
1514         <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">
1515                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1516                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1517                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1518                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1519                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1520                 </fields>
1521         <links>
1522             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1523             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1524             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1525         </links>
1526         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1527             <actions>
1528                 <create permission="UPDATE_COPY">
1529                     <context link="target_copy" field="circ_lib"/>
1530                 </create>
1531                 <retrieve/>
1532                 <update permission="UPDATE_COPY">
1533                     <context link="target_copy" field="circ_lib"/>
1534                 </update>
1535                 <delete permission="UPDATE_COPY">
1536                     <context link="target_copy" field="circ_lib"/>
1537                 </delete>
1538             </actions>
1539         </permacrud>
1540         </class>
1541
1542         <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">
1543                 <fields oils_persist:primary="code">
1544                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1545                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1546                 </fields>
1547                 <links/>
1548         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1549             <actions>
1550                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1551                 <retrieve/>
1552                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1553                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1554             </actions>
1555         </permacrud>
1556         </class>
1557
1558         <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">
1559                 <fields oils_persist:primary="code">
1560                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1561                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1562                 </fields>
1563                 <links/>
1564         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1565             <actions>
1566                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1567                 <retrieve/>
1568                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1569                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1570             </actions>
1571         </permacrud>
1572         </class>
1573
1574         <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">
1575                 <fields oils_persist:primary="code">
1576                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1577                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1578                 </fields>
1579                 <links/>
1580         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1581             <actions>
1582                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1583                 <retrieve/>
1584                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1585                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1586             </actions>
1587         </permacrud>
1588         </class>
1589
1590     <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">
1591         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1592             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1593             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1594             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1595             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1596             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1597             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1598             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1599             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1600             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1601             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1602             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1603             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1604             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1605             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1606             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1607             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1608             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1609         </fields>
1610         <links/>
1611         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1612             <actions>
1613                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1614                 <retrieve/>
1615                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1616                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1617             </actions>
1618         </permacrud>
1619     </class>
1620
1621     <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">
1622         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1623             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1624             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1625             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1626             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1627             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1628             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1629             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1630             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1631             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1632             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1633             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1634             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1635             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1636             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1637             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1638             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1639             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1640             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1641             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1642         </fields>
1643         <links/>
1644         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1645             <actions>
1646                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1647                 <retrieve/>
1648                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1649                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1650             </actions>
1651         </permacrud>
1652     </class>
1653
1654     <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">
1655         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1656             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1657             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1658             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1659             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1660             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1661         </fields>
1662         <links>
1663             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1664             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1665             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1666         </links>
1667         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1668             <actions>
1669                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1670                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1671                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1672                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1673             </actions>
1674         </permacrud>
1675     </class>
1676
1677         <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">
1678                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1679                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1680                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1681                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1682                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1683                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1684                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1685                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1686                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1687                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1688                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1689                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1690                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1691                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1692                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1693                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1694                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1695             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1696                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1697                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1698                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1699                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1700                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1701                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1702                 </fields>
1703                 <links>
1704                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1705                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1706                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1707                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1708                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1709                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1710                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1711                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1712                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1713                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1714                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1715                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1716                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1717             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1718                 </links>
1719         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1720             <actions>
1721                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1722                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1723                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1724                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1725             </actions>
1726         </permacrud>
1727         </class>
1728
1729         <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">
1730                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1731                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1732                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1733                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1734                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1735                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1736                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1737                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1738                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1739                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1740                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1741                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1742                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1743                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1744                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1745                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1746             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1747                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1748                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1749             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1750                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1751                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1752                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1753                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1754             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1755             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1756             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1757                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1758                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1759                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1760                 </fields>
1761                 <links>
1762                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1763                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1764                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1765                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1766                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1767                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1768                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1769                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1770                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1771                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1772                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1773                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1774                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1775                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1776             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1777                 </links>
1778         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1779             <actions>
1780                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1781                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1782                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1783                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1784             </actions>
1785         </permacrud>
1786         </class>
1787
1788     <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">
1789         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1790             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1791             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1792             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1793         </fields>
1794         <links/>
1795         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1796             <actions>
1797                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1798                 <retrieve/>
1799                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1800                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1801             </actions>
1802         </permacrud>
1803     </class>
1804
1805     <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">
1806         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1807             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1808             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1809             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1810             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1811             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1812             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1813             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1814         </fields>
1815         <links>
1816             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1817         </links>
1818         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1819             <actions>
1820                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1821                 <retrieve/>
1822                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1823                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1824             </actions>
1825         </permacrud>
1826     </class>
1827
1828     <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">
1829         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
1830             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1831             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
1832             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1833             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
1834             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1835         </fields>
1836         <links>
1837             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1838             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1839         </links>
1840         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1841             <actions>
1842                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1843                     <context link="matchpoint" field="org_unit"/>
1844                 </create>
1845                 <retrieve/>
1846                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1847                     <context link="matchpoint" field="org_unit"/>
1848                 </update>
1849                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1850                     <context link="matchpoint" field="org_unit"/>
1851                 </delete>
1852             </actions>
1853         </permacrud>
1854     </class>
1855
1856     <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">
1857         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
1858             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1859             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1860             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1861         </fields>
1862         <links>
1863             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1864             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1865         </links>
1866         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1867             <actions>
1868                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1869                     <context link="limit_set" field="owning_lib"/>
1870                 </create>
1871                 <retrieve/>
1872                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1873                     <context link="limit_set" field="owning_lib"/>
1874                 </update>
1875                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1876                     <context link="limit_set" field="owning_lib"/>
1877                 </delete>
1878             </actions>
1879         </permacrud>
1880     </class>
1881     <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">
1882         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
1883             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1884             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1885             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
1886         </fields>
1887         <links>
1888             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1889             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
1890         </links>
1891         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1892             <actions>
1893                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1894                     <context link="limit_set" field="owning_lib"/>
1895                 </create>
1896                 <retrieve/>
1897                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1898                     <context link="limit_set" field="owning_lib"/>
1899                 </update>
1900                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1901                     <context link="limit_set" field="owning_lib"/>
1902                 </delete>
1903             </actions>
1904         </permacrud>
1905     </class>
1906
1907     <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">
1908         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
1909             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1910             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1911             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
1912             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
1913         </fields>
1914         <links>
1915             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1916             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
1917         </links>
1918         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1919             <actions>
1920                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1921                     <context link="limit_set" field="owning_lib"/>
1922                 </create>
1923                 <retrieve/>
1924                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1925                     <context link="limit_set" field="owning_lib"/>
1926                 </update>
1927                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1928                     <context link="limit_set" field="owning_lib"/>
1929                 </delete>
1930             </actions>
1931         </permacrud>
1932     </class>
1933
1934         <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">
1935                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1936                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1937                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1938                 </fields>
1939                 <links/>
1940         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1941             <actions>
1942                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1943                 <retrieve/>
1944                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1945                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1946             </actions>
1947         </permacrud>
1948         </class>
1949
1950         <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">
1951                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1952                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1953                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1954                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1955                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1956                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1957                 </fields>
1958                 <links>
1959                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1960                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1961                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1962                 </links>
1963         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1964             <actions>
1965                 <create permission="ADMIN_SURVEY">
1966                     <context link="survey" field="owner"/>
1967                 </create>
1968                 <retrieve/>
1969                 <update permission="ADMIN_SURVEY">
1970                     <context link="survey" field="owner"/>
1971                 </update>
1972                 <delete permission="ADMIN_SURVEY">
1973                     <context link="survey" field="owner"/>
1974                 </delete>
1975             </actions>
1976         </permacrud>
1977         </class>
1978         <class id="mbts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billable_transaction_summary" oils_persist:tablename="money.materialized_billable_xact_summary" reporter:label="Billable Transaction Summary" oils_persist:readonly="true">
1979                 <fields oils_persist:primary="id" oils_persist:sequence="">
1980                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1981                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1982                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1983                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1984                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1985                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1986                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1987                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1988                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1989                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1990                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1991                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1992                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1993                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1994                 </fields>
1995                 <links>
1996                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1997                 </links>
1998                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1999                         <actions>
2000                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2001                                         <context link="usr" field="home_ou" />
2002                                 </retrieve>
2003                         </actions>
2004                 </permacrud>
2005         </class>
2006         <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">
2007                 <fields oils_persist:primary="id" oils_persist:sequence="">
2008                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2009                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2010                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2011                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2012                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2013                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2014                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2015                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2016                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2017                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2018                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2019                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2020                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2021                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2022                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2023                 </fields>
2024                 <links>
2025                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2026                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2027                 </links>
2028         </class>
2029         <class id="aum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message" oils_persist:tablename="actor.usr_message" reporter:label="User Message">
2030                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2031                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2032                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2033                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2034                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2035                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2036                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2037                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2038                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2039                 </fields>
2040                 <links>
2041                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2042                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2043                 </links>
2044                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2045                         <actions> <!-- created magically, so no create action -->
2046                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2047                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2048                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2049                         </actions>
2050                 </permacrud>
2051         </class>
2052         <class id="auml" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message_limited" oils_persist:tablename="actor.usr_message_limited" reporter:label="User Message (Limited Access)">
2053                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2054                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2055                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2056                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2057                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2058                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2059                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2060                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2061                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2062                 </fields>
2063                 <links>
2064                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2065                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2066                 </links>
2067                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2068                         <actions> <!-- created magically, so no create action -->
2069                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2070                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2071                         </actions>
2072                 </permacrud>
2073         </class>
2074         <class id="aun" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
2075                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
2076                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2077                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
2078                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2079                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2080                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
2081                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2082                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
2083                 </fields>
2084                 <links>
2085                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2086                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2087                 </links>
2088         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2089             <actions>
2090                 <create permission="UPDATE_USER" context_field="owner">
2091                     <context link="usr" field="home_ou"/>
2092                 </create>
2093                                 <!-- note: public notes are still accessible via API -->
2094                 <retrieve permission="UPDATE_USER">
2095                     <context link="usr" field="home_ou"/>
2096                                 </retrieve>
2097                 <update permission="UPDATE_USER">
2098                     <context link="usr" field="home_ou"/>
2099                                 </update>
2100                 <delete permission="UPDATE_USER">
2101                     <context link="usr" field="home_ou"/>
2102                                 </delete>
2103             </actions>
2104         </permacrud>
2105         </class>
2106         <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">
2107                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2108                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2109                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2110                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2111                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2112                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2113                 </fields>
2114                 <links>
2115                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2116                 </links>
2117         </class>
2118         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
2119                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2120                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2121                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2122                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2123                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2124                 </fields>
2125                 <links>
2126                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2127                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2128                 </links>
2129         </class>
2130         <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">
2131                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2132                         <field name="field" reporter:datatype="link"/>
2133                         <field name="id" reporter:datatype="id" />
2134                         <field name="source" reporter:datatype="link"/>
2135                         <field name="value" reporter:datatype="text"/>
2136                 </fields>
2137                 <links>
2138                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2139                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2140                 </links>
2141         </class>
2142         <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">
2143                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2144                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2145                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2146                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2147                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2148                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2149                 </fields>
2150                 <links>
2151                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2152                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2153                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2154                 </links>
2155         </class>
2156         <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">
2157                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2158                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2159                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2160                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2161                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2162                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2163                 </fields>
2164                 <links>
2165                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2166                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2167                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2168                 </links>
2169         </class>
2170         <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">
2171                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2172                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2173                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2174                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2175                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2176                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2177                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2178                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2179                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2180                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2181                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2182                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2183                 </fields>
2184                 <links>
2185                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2186                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2187                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2188                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2189                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2190                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2191                 </links>
2192         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2193             <actions>
2194                 <create permission="TRANSIT_COPY" context_field="owner">
2195                     <context link="target_copy" field="circ_lib"/>
2196                 </create>
2197                 <retrieve/>
2198                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2199                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2200             </actions>
2201         </permacrud>
2202         </class>
2203         <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">
2204                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2205                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2206                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2207                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2208                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2209                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2210                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2211                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2212                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2213                 </fields>
2214                 <links>
2215                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2216                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2217                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2218                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2219                 </links>
2220         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2221             <actions>
2222                 <create permission="ADMIN_SURVEY">
2223                     <context link="survey" field="owner"/>
2224                 </create>
2225                 <retrieve/>
2226                 <update permission="ADMIN_SURVEY">
2227                     <context link="survey" field="owner"/>
2228                 </update>
2229                 <delete permission="ADMIN_SURVEY">
2230                     <context link="survey" field="owner"/>
2231                 </delete>
2232             </actions>
2233         </permacrud>
2234         </class>
2235         <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">
2236                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2237                         <field name="bucket" />
2238                         <field name="id" reporter:datatype="id" />
2239                         <field name="target_copy" reporter:datatype="link"/>
2240                         <field name="create_time" reporter:datatype="timestamp" />
2241                         <field name="pos" reporter:datatype="int" />
2242                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2243                 </fields>
2244                 <links>
2245                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2246                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2247             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2248                 </links>
2249         </class>
2250         <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">
2251                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2252                         <field name="id" reporter:datatype="id" />
2253                         <field name="item" reporter:datatype="link"/>
2254                         <field name="note" reporter:datatype="text" />
2255                 </fields>
2256                 <links>
2257                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2258                 </links>
2259         </class>
2260
2261         <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">
2262                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2263                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2264                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2265                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2266                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2267                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2268                 </fields>
2269                 <links>
2270                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2271                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2272                 </links>
2273                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2274                         <actions>
2275                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2276                                 <retrieve/>
2277                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2278                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2279                         </actions>
2280                 </permacrud>
2281         </class>
2282
2283         <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">
2284                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2285                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2286                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2287                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2288                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2289                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2290                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2291                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2292                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2293                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2294                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2295                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2296                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2297                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2298                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2299                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2300                 </fields>
2301                 <links>
2302                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2303                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2304                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2305                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2306                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2307                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2308                 </links>
2309                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2310                         <actions>
2311                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2312                                 <retrieve/>
2313                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2314                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2315                         </actions>
2316                 </permacrud>
2317         </class>
2318
2319         <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">
2320                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2321                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2322                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2323                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2324                 </fields>
2325                 <links>
2326                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2327                 </links>
2328                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2329                         <actions>
2330                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2331                                 <retrieve/>
2332                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2333                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2334                         </actions>
2335                 </permacrud>
2336         </class>
2337
2338         <class id="acsbfmfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_bib_field_metabib_field_map" oils_persist:tablename="authority.control_set_bib_field_metabib_field_map" reporter:label="Authority Control Set Bib Field to Metabib Field Map" oils_persist:field_safe="true">
2339                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2340                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2341                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2342                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2343                 </fields>
2344                 <links>
2345                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2346                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2347                 </links>
2348                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2349                         <actions>
2350                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2351                                 <retrieve/>
2352                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2353                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2354                         </actions>
2355                 </permacrud>
2356         </class>
2357
2358         <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">
2359                 <fields oils_persist:primary="code">
2360                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2361                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2362                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2363                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2364                 </fields>
2365                 <links>
2366                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2367                 </links>
2368                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2369                         <actions>
2370                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2371                                 <retrieve/>
2372                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2373                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2374                         </actions>
2375                 </permacrud>
2376         </class>
2377
2378         <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">
2379                 <fields oils_persist:primary="code">
2380                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2381                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2382                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2383                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2384                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2385                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2386                 </fields>
2387                 <links>
2388                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2389                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2390                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2391                 </links>
2392                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2393                         <actions>
2394                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2395                                 <retrieve/>
2396                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2397                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2398                         </actions>
2399                 </permacrud>
2400         </class>
2401
2402     <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">
2403         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2404             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2405             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2406             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2407         </fields>
2408         <links>
2409             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2410             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2411         </links>
2412         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2413             <actions>
2414                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2415                 <retrieve/>
2416                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2417                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2418             </actions>
2419         </permacrud>
2420     </class>
2421
2422         <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">
2423                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2424                         <field name="active" reporter:datatype="bool"/>
2425                         <field name="create_date" reporter:datatype="timestamp"/>
2426                         <field name="creator" />
2427                         <field name="deleted" reporter:datatype="bool"/>
2428                         <field name="edit_date" reporter:datatype="timestamp"/>
2429                         <field name="editor" />
2430                         <field name="id" reporter:datatype="id" />
2431                         <field name="last_xact_id" />
2432                         <field name="marc" />
2433                         <field name="source" />
2434                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2435                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2436                         <field name="heading" />
2437                         <field name="simple_heading" />
2438                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2439                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2440                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2441                 </fields>
2442                 <links>
2443                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2444                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2445                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2446                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2447                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2448                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2449                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2450                 </links>
2451                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2452                         <actions>
2453                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2454                                 <retrieve/>
2455                                 <update permission="UPDATE_MARC" global_required="true"/>
2456                                 <delete permission="UPDATE_MARC" global_required="true"/>
2457                         </actions>
2458                 </permacrud>
2459         </class>
2460         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2461                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2462                         <field name="char_encoding" />
2463                         <field name="id" />
2464                         <field name="record" />
2465                         <field name="record_status" />
2466                         <field name="thesaurus" />
2467                 </fields>
2468                 <links>
2469                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2470                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2471                 </links>
2472         </class>
2473         <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">
2474                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2475                         <field name="id" reporter:datatype="id" />
2476                         <field name="bib" reporter:datatype="link" />
2477                         <field name="authority" reporter:datatype="link" />
2478                 </fields>
2479                 <links>
2480                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2481                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2482                 </links>
2483         </class>
2484         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2485                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2486                         <field name="id" reporter:datatype="id" />
2487                         <field name="record" reporter:datatype="link" />
2488                         <field name="atag" reporter:datatype="link" />
2489                         <field name="value" reporter:datatype="text" />
2490                 </fields>
2491                 <links>
2492                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2493                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2494                 </links>
2495         </class>
2496         <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">
2497                 <fields oils_persist:primary="code" oils_persist:sequence="">
2498                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2499                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2500                 </fields>
2501                 <links/>
2502         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2503             <actions>
2504                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2505                 <retrieve/>
2506                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2507                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2508             </actions>
2509         </permacrud>
2510         </class>
2511         <class id="mccp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::credit_card_payment" oils_persist:tablename="money.credit_card_payment" reporter:label="Credit Card Payment">
2512                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2513                         <field name="accepting_usr" />
2514                         <field name="amount" reporter:datatype="money" />
2515                         <field name="amount_collected" reporter:datatype="money" />
2516                         <field name="approval_code" reporter:datatype="text"/>
2517                         <field name="cash_drawer" reporter:datatype="link"/>
2518                         <field name="cc_first_name" reporter:datatype="text"/>
2519                         <field name="cc_last_name" reporter:datatype="text"/>
2520                         <field name="cc_number" reporter:datatype="text"/>
2521                         <field name="cc_order_number" reporter:datatype="text"/>
2522                         <field name="cc_type" reporter:datatype="text"/>
2523                         <field name="cc_processor" reporter:datatype="text"/>
2524                         <field name="expire_month" reporter:datatype="int" />
2525                         <field name="expire_year" reporter:datatype="int" />
2526                         <field name="id" reporter:datatype="id" />
2527                         <field name="note" reporter:datatype="text"/>
2528                         <field name="payment_ts" reporter:datatype="timestamp"/>
2529                         <field name="xact" reporter:datatype="link"/>
2530                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2531                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2532                 </fields>
2533                 <links>
2534                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2535                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2536                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2537                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2538                 </links>
2539         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2540             <actions>
2541                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2542                     <context link="xact" jump="usr" field="home_ou"/>
2543                 </retrieve>
2544                         </actions>
2545                 </permacrud>
2546         </class>
2547         <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">
2548                 <fields oils_persist:primary="name">
2549                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2550                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2551                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2552                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2553                 </fields>
2554                 <links/>
2555         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2556             <actions>
2557                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2558                 <retrieve/>
2559                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2560                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2561             </actions>
2562         </permacrud>
2563         </class>
2564
2565         <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">
2566                 <fields oils_persist:primary="alias">
2567                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2568                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2569                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2570                 </fields>
2571                 <links>
2572                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2573                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2574                 </links>
2575         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2576             <actions>
2577                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2578                 <retrieve/>
2579                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2580                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2581             </actions>
2582         </permacrud>
2583         </class>
2584
2585         <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">
2586                 <fields oils_persist:primary="name">
2587                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2588                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2589                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2590                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2591                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2592                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2593                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2594                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2595                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2596                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2597                 </fields>
2598                 <links>
2599                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2600                 </links>
2601         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2602             <actions>
2603                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2604                 <retrieve/>
2605                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2606                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2607             </actions>
2608         </permacrud>
2609         </class>
2610
2611         <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">
2612                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2613                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2614                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2615                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2616                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2617                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2618                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2619                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2620                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2621                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2622                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2623                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2624                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2625                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2626                 </fields>
2627                 <links>
2628                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2629                 </links>
2630         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2631             <actions>
2632                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2633                 <retrieve/>
2634                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2635                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2636             </actions>
2637         </permacrud>
2638         </class>
2639         <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">
2640                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2641                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2642                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2643                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2644                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2645                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2646                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2647                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2648                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2649                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2650                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2651                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2652                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2653                 </fields>
2654                 <links>
2655                 </links>
2656                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2657                         <actions>
2658                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2659                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2660                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2661                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2662                         </actions>
2663                 </permacrud>
2664         </class>
2665         <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">
2666                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2667                         <field name="id" reporter:datatype="id" />
2668                         <field name="name" reporter:datatype="text"/>
2669                         <field name="xpath" reporter:datatype="text"/>
2670                         <field name="format" reporter:datatype="link"/>
2671                         <field name="first_word" reporter:datatype="bool" />
2672                 </fields>
2673                 <links/>
2674         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2675             <actions>
2676                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2677                 <retrieve/>
2678                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2679                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2680             </actions>
2681         </permacrud>
2682         </class>
2683         <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">
2684                 <fields oils_persist:primary="code" oils_persist:sequence="">
2685                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2686                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2687                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2688                 </fields>
2689                 <links/>
2690         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2691             <actions>
2692                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2693                 <retrieve/>
2694                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2695                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2696             </actions>
2697         </permacrud>
2698         </class>
2699         <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">
2700                 <fields oils_persist:primary="code" oils_persist:sequence="">
2701                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2702                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2703                 </fields>
2704                 <links/>
2705         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2706             <actions>
2707                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2708                 <retrieve/>
2709                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2710                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2711             </actions>
2712         </permacrud>
2713         </class>
2714     <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">
2715         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2716             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2717             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2718             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2719             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2720         </fields>
2721         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2722             <actions>
2723                 <retrieve/>
2724             </actions>
2725         </permacrud>
2726     </class>
2727         <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">
2728                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2729                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2730                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2731                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2732                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2733                 </fields>
2734                 <links>
2735                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2736                 </links>
2737         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2738             <actions>
2739                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2740                 <retrieve/>
2741                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2742                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2743             </actions>
2744         </permacrud>
2745         </class>
2746         <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">
2747                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2748                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2749                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2750                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2751                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2752                 </fields>
2753                 <links>
2754                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2755                 </links>
2756         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2757             <actions>
2758                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2759                 <retrieve/>
2760                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2761                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2762             </actions>
2763         </permacrud>
2764         </class>
2765         <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">
2766                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2767                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2768                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2769                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2770                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2771                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2772                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2773                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2774                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2775                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2776                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2777                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2778                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2779                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2780                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2781                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2782                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2783                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2784                 </fields>
2785                 <links>
2786                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2787                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2788                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2789                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2790                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2791                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2792                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2793                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2794                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2795                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2796                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2797                 </links>
2798         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2799             <actions>
2800                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2801                 <retrieve/>
2802                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2803                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2804             </actions>
2805         </permacrud>
2806         </class>
2807         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2808                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2809                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2810                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2811                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2812                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2813                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2814                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2815                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2816                 </fields>
2817                 <links>
2818                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2819                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2820         </links>
2821         </class>
2822         <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">
2823                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2824                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2825                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2826                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2827                 </fields>
2828                 <links>
2829                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2830                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2831                 </links>
2832         </class>
2833         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2834                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2835                         <field name="id" reporter:datatype="id" />
2836                         <field name="value" oils_persist:i18n="true" />
2837                 </fields>
2838                 <links/>
2839         </class>
2840         <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">
2841                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2842                         <field name="balance_owed" reporter:datatype="money" />
2843                         <field name="total_owed" reporter:datatype="money" />
2844                         <field name="total_paid" reporter:datatype="money" />
2845                         <field name="usr" reporter:datatype="link"/>
2846                 </fields>
2847                 <links>
2848                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2849         </links>
2850         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2851             <actions>
2852                 <retrieve permission="VIEW_USER">
2853                     <context link="usr" field="home_ou"/>
2854                 </retrieve>
2855             </actions>
2856         </permacrud>
2857         </class>
2858         <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">
2859                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2860                         <field name="collector" />
2861                         <field name="enter_time" reporter:datatype="timestamp"/>
2862                         <field name="id" reporter:datatype="id" />
2863                         <field name="location" reporter:datatype="link"/>
2864                         <field name="usr" reporter:datatype="link"/>
2865                 </fields>
2866                 <links>
2867                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2868                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2869                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2870                 </links>
2871         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2872             <actions>
2873                 <create permission="money.collections_tracker.create" context_field="location"/>
2874                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2875                 <delete permission="money.collections_tracker.create" context_field="location"/>
2876             </actions>
2877         </permacrud>
2878         </class>
2879         <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">
2880                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2881                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2882                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2883                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2884                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2885                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2886                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2887                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2888                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2889                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2890                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2891                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2892                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2893                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2894                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2895                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2896                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2897                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2898                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2899                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2900                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2901                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2902                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2903                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2904                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2905                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2906                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2907                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2908                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2909                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2910                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2911                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2912                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2913                 </fields>
2914                 <links>
2915                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2916                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2917                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2918                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2919                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2920                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2921                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2922                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2923                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2924                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2925                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2926                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2927                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2928                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2929                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2930                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2931                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2932                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2933                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2934                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
2935                 </links>
2936         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2937             <actions>
2938                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2939                 <retrieve/>
2940                 <update permission="UPDATE_MARC" global_required="true"/>
2941                 <!-- WARNING: Deleting records via PCRUD does NOT check that any prerequisite conditions have been handled first. It is your responsibility to check for those conditions before deleting bib records. -->
2942                 <delete permission="DELETE_RECORD" global_required="true"/>
2943             </actions>
2944         </permacrud>
2945         </class>
2946         <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">
2947                 <fields oils_persist:primary="id">
2948                         <field name="dow_0_close" />
2949                         <field name="dow_0_open" />
2950                         <field name="dow_1_close" />
2951                         <field name="dow_1_open" />
2952                         <field name="dow_2_close" />
2953                         <field name="dow_2_open" />
2954                         <field name="dow_3_close" />
2955                         <field name="dow_3_open" />
2956                         <field name="dow_4_close" />
2957                         <field name="dow_4_open" />
2958                         <field name="dow_5_close" />
2959                         <field name="dow_5_open" />
2960                         <field name="dow_6_close" />
2961                         <field name="dow_6_open" />
2962                         <field name="id" reporter:datatype="id" />
2963                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2964                 </fields>
2965                 <links>
2966                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2967                 </links>
2968         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2969             <actions>
2970                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2971                 <retrieve/>
2972                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2973                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2974             </actions>
2975         </permacrud>
2976         </class>
2977         <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">
2978                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2979                         <field name="id" reporter:datatype="id" />
2980                         <field name="record" reporter:datatype="link"/>
2981                         <field name="label" reporter:datatype="text"/>
2982                         <field name="label_sortkey" reporter:datatype="text"/>
2983                 </fields>
2984                 <links>
2985                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2986                 </links>
2987         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2988             <actions>
2989                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2990                 <retrieve/>
2991                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2992                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2993             </actions>
2994         </permacrud>
2995         </class>
2996         <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">
2997                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2998                         <field name="id" reporter:datatype="id" />
2999                         <field name="target_copy" reporter:datatype="link" />
3000                         <field name="part" reporter:datatype="link"/>
3001                 </fields>
3002                 <links>
3003                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3004                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3005                 </links>
3006         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3007             <actions>
3008                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3009                 <retrieve/>
3010                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3011                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3012             </actions>
3013         </permacrud>
3014         </class>
3015         <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">
3016                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3017                         <field name="close_end" reporter:datatype="timestamp" />
3018                         <field name="close_start" reporter:datatype="timestamp" />
3019                         <field name="id" reporter:datatype="id" />
3020                         <field name="org_unit" reporter:datatype="org_unit"/>
3021                         <field name="reason" reporter:datatype="text"/>
3022                 </fields>
3023                 <links>
3024                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3025                 </links>
3026         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3027             <actions>
3028                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3029                 <retrieve/>
3030                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3031                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3032             </actions>
3033         </permacrud>
3034         </class>
3035         <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">
3036                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3037                         <field name="extended" reporter:datatype="interval"/>
3038                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3039                         <field name="max_renewals" reporter:datatype="int" />
3040                         <field name="name" reporter:datatype="text"/>
3041                         <field name="normal" reporter:datatype="interval"/>
3042                         <field name="shrt" reporter:datatype="interval"/>
3043                 </fields>
3044                 <links>
3045                 </links>
3046         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3047             <actions>
3048                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3049                 <retrieve/>
3050                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3051                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3052             </actions>
3053         </permacrud>
3054         </class>
3055
3056         <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">
3057                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3058                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3059                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3060             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3061                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3062             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3063                 </fields>
3064                 <links>
3065             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3066                 </links>
3067                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3068             <actions>
3069                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3070                 <retrieve/>
3071                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3072                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3073             </actions>
3074                 </permacrud>
3075         </class>
3076
3077         <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">
3078                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3079                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3080                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
3081                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3082             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3083                 </fields>
3084                 <links>
3085                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3086                 </links>
3087                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3088             <actions>
3089                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3090                 <retrieve/>
3091                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3092                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3093             </actions>
3094                 </permacrud>
3095         </class>
3096
3097         <class id="mobts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::open_billable_transaction_summary" oils_persist:tablename="money.open_billable_xact_summary" reporter:label="Open Billable Transaction Summary">
3098                 <fields oils_persist:primary="id" oils_persist:sequence="">
3099                         <field name="balance_owed" reporter:datatype="money"/>
3100                         <field name="id" reporter:datatype="id" />
3101                         <field name="last_billing_note" reporter:datatype="text"/>
3102                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3103                         <field name="last_billing_type" reporter:datatype="text"/>
3104                         <field name="last_payment_note" reporter:datatype="text"/>
3105                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3106                         <field name="last_payment_type" reporter:datatype="text"/>
3107                         <field name="total_owed" reporter:datatype="money"/>
3108                         <field name="total_paid" reporter:datatype="money"/>
3109                         <field name="usr" reporter:datatype="link"/>
3110                         <field name="xact_finish" reporter:datatype="timestamp" />
3111                         <field name="xact_start" reporter:datatype="timestamp" />
3112                         <field name="xact_type" reporter:datatype="text"/>
3113                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3114                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3115                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3116                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3117                         <field name="billing_location" reporter:datatype="link"/>
3118                 </fields>
3119                 <links>
3120                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3121                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3122                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3123                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3124                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3125                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3126                 </links>
3127                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3128                         <actions>
3129                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3130                                         <context link="usr" field="home_ou" />
3131                                 </retrieve>
3132                         </actions>
3133                 </permacrud>
3134         </class>
3135         <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">
3136                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3137                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3138                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3139                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3140                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3141                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3142                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3143                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3144                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3145                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3146                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3147                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3148                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3149                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3150                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3151                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3152                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3153                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3154                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3155                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3156                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3157                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3158                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3159                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3160                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3161                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3162                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3163                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3164                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3165                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
3166                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3167                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3168                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3169                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3170                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3171                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3172                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3173                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3174                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3175                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3176                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3177                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3178                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3179                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3180                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3181                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3182                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3183                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3184                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3185                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3186                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3187                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3188                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3189                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3190                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3191                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3192                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3193                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3194                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3195                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3196                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3197                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3198                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3199                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3200                 </fields>
3201                 <links>
3202                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3203                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3204                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3205                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3206                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3207                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3208                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3209                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3210                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3211                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3212                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3213                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3214                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3215                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3216                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3217                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3218                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3219                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3220                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3221                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3222                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3223                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3224                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3225                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3226                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3227                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3228                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3229                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3230                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3231                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3232                 </links>
3233                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3234                         <actions>
3235                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3236                         </actions>
3237                 </permacrud>
3238         </class>
3239         <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">
3240                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3241                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3242                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3243                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3244                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3245                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3246                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3247                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3248                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3249         </fields>
3250                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3251                         <actions>
3252                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3253                                 <retrieve/>
3254                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3255                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3256                         </actions>
3257                 </permacrud>
3258         </class>
3259         <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">
3260                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3261                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3262                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3263                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3264                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3265         </fields>
3266         <links>
3267                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3268                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3269                 </links>
3270                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3271                         <actions>
3272                                 <retrieve permission="RUN_REPORTS">
3273                                         <context link="usr" field="home_ou" />
3274                                 </retrieve>
3275                         </actions>
3276                 </permacrud>
3277         </class>
3278         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3279                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3280                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3281                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3282                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3283                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3284                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3285                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3286         </fields>
3287         <links>
3288                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3289                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3290                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3291                 </links>
3292                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3293                         <actions>
3294                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3295                                         <context link="usr" field="home_ou" />
3296                                         <context link="ws" field="owning_lib" />
3297                                 </retrieve>
3298                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3299                                         <context link="usr" field="home_ou" />
3300                                         <context link="ws" field="owning_lib" />
3301                                 </create>
3302                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3303                                         <context link="usr" field="home_ou" />
3304                                         <context link="ws" field="owning_lib" />
3305                                 </update>
3306                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3307                                         <context link="usr" field="home_ou" />
3308                                         <context link="ws" field="owning_lib" />
3309                                 </delete>
3310                         </actions>
3311                 </permacrud>
3312         </class>
3313         <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">
3314                 <fields oils_persist:primary="name">
3315                         <field name="name" reporter:datatype="text"/>
3316                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3317                 </fields>
3318                 <links/>
3319                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3320                         <actions>
3321                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3322                                 <retrieve/>
3323                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3324                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3325                         </actions>
3326                 </permacrud>
3327         </class>
3328         <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">
3329                 <fields oils_persist:primary="name">
3330                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3331                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3332                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3333                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3334                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3335                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3336                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3337                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3338                 </fields>
3339                 <links>
3340                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3341                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3342                 </links>
3343                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3344                         <actions>
3345                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3346                                 <retrieve/>
3347                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3348                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3349                         </actions>
3350                 </permacrud>
3351         </class>
3352         <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">
3353                 <fields oils_persist:primary="name">
3354                         <field name="name" reporter:datatype="text"/>
3355                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3356                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3357                         <field name="datatype" reporter:datatype="text"/>
3358                         <field name="view_perm" reporter:datatype="link"/>
3359                         <field name="update_perm" reporter:datatype="link"/>
3360                         <field name="fm_class" reporter:datatype="text"/>
3361                         <field name="grp" reporter:datatype="link"/>
3362                 </fields>
3363                 <links>
3364                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3365                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3366                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3367                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3368                 </links>
3369                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3370                         <actions>
3371                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3372                                 <retrieve/>
3373                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3374                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3375                         </actions>
3376                 </permacrud>
3377         </class>
3378         <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">
3379                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3380                         <field name="id" />
3381                         <field name="name"  reporter:datatype="text"/>
3382                         <field name="org_unit" reporter:datatype="org_unit"/>
3383                         <field name="value"  reporter:datatype="text"/>
3384                 </fields>
3385                 <links>
3386                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3387                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3388                 </links>
3389         </class>
3390         <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">
3391                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3392                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3393                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3394                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3395                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3396                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3397                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3398                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3399                 </fields>
3400                 <links>
3401                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3402                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3403                 </links>
3404         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3405             <actions>
3406                 <create permission="CREATE_COPY_NOTE">
3407                     <context link="owning_copy" field="circ_lib"/>
3408                 </create>
3409                 <retrieve permission="VIEW_COPY_NOTES">
3410                     <context link="owning_copy" field="circ_lib"/>
3411                 </retrieve>
3412                 <update permission="UPDATE_COPY_NOTE">
3413                     <context link="owning_copy" field="circ_lib"/>
3414                 </update>
3415                 <delete permission="DELETE_COPY_NOTE">
3416                     <context link="owning_copy" field="circ_lib"/>
3417                 </delete>
3418             </actions>
3419         </permacrud>
3420         </class>
3421         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3422                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3423                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3424                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3425                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3426                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3427                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3428                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3429                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3430                 </fields>
3431                 <links>
3432                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3433                 </links>
3434         </class>
3435         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3436                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3437                         <field name="fingerprint"  reporter:datatype="text"/>
3438                         <field name="id" reporter:datatype="id" />
3439                         <field name="master_record" reporter:datatype="link"/>
3440                         <field name="mods"  reporter:datatype="text"/>
3441                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3442                 </fields>
3443                 <links>
3444                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3445                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3446                 </links>
3447         </class>
3448         <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">
3449                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3450                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3451                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3452                 </fields>
3453                 <links/>
3454         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3455             <actions>
3456                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3457                 <retrieve/>
3458                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3459                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3460             </actions>
3461         </permacrud>
3462         </class>
3463         <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">
3464                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3465                         <field name="code"  reporter:datatype="text"/>
3466                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3467                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3468                 </fields>
3469                 <links/>
3470         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3471             <actions>
3472                 <create permission="CREATE_PERM" global_required="true"/>
3473                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3474                 <update permission="UPDATE_PERM" global_required="true"/>
3475                 <delete permission="DELETE_PERM" global_required="true"/>
3476             </actions>
3477         </permacrud>
3478         </class>
3479         <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">
3480                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3481                         <field name="id" reporter:datatype="id" />
3482                         <field name="metarecord" reporter:datatype="link"/>
3483                         <field name="source" reporter:datatype="link"/>
3484                 </fields>
3485                 <links>
3486                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3487                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3488                 </links>
3489         </class>
3490         <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">
3491                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3492                         <field name="id" reporter:datatype="id" />
3493                         <field name="field" reporter:datatype="link"/>
3494                         <field name="source" reporter:datatype="link"/>
3495                         <field name="value"  reporter:datatype="text"/>
3496                 </fields>
3497                 <links>
3498                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3499                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3500                 </links>
3501         </class>
3502         <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">
3503                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3504                         <field name="id" reporter:datatype="id" />
3505                         <field name="value" reporter:datatype="text"/>
3506                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3507                 </fields>
3508                 <links>
3509                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3510                 </links>
3511         </class>
3512         <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">
3513                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3514                         <field name="id" reporter:datatype="id" />
3515                         <field name="entry" reporter:datatype="link"/>
3516                         <field name="def" reporter:datatype="link"/>
3517                         <field name="source" reporter:datatype="link"/>
3518                 </fields>
3519                 <links>
3520                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3521                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3522                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3523                 </links>
3524         </class>
3525         <class id="mbeshm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry_simple_heading_map" oils_persist:tablename="metabib.browse_entry_simple_heading_map" reporter:label="Combined Browse Entry Simple Authority Heading Map" oils_persist:readonly="true">
3526                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
3527                         <field name="id" reporter:datatype="id" />
3528                         <field name="entry" reporter:datatype="link"/>
3529                         <field name="simple_heading" reporter:datatype="link"/>
3530                 </fields>
3531                 <links>
3532                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3533                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
3534                 </links>
3535         </class>
3536         <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">
3537                 <oils_persist:source_definition>
3538                         SELECT * FROM metabib.author_field_entry
3539                                                 UNION ALL
3540                         SELECT * FROM metabib.keyword_field_entry
3541                                                 UNION ALL
3542                         SELECT * FROM metabib.identifier_field_entry
3543                                                 UNION ALL
3544                         SELECT * FROM metabib.title_field_entry
3545                                                 UNION ALL
3546                         SELECT * FROM metabib.subject_field_entry
3547                                                 UNION ALL
3548                         SELECT * FROM metabib.series_field_entry
3549                 </oils_persist:source_definition>
3550                 <fields>
3551                         <field name="field" reporter:datatype="link"/>
3552                         <field name="id" reporter:datatype="id" />
3553                         <field name="source" reporter:datatype="link"/>
3554                         <field name="value"  reporter:datatype="text"/>
3555                 </fields>
3556                 <links>
3557                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3558                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3559                 </links>
3560         </class>
3561         <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">
3562                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3563                         <field name="field" reporter:datatype="link"/>
3564                         <field name="id" reporter:datatype="id" />
3565                         <field name="source" reporter:datatype="link"/>
3566                         <field name="value"  reporter:datatype="text"/>
3567                 </fields>
3568                 <links>
3569                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3570                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3571                 </links>
3572         </class>
3573         <class id="mcp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
3574                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3575                         <field name="accepting_usr" reporter:datatype="link"/>
3576                         <field name="amount" reporter:datatype="money" />
3577                         <field name="amount_collected" reporter:datatype="money" />
3578                         <field name="cash_drawer" reporter:datatype="link"/>
3579                         <field name="id" reporter:datatype="id" />
3580                         <field name="note"  reporter:datatype="text"/>
3581                         <field name="payment_ts" reporter:datatype="timestamp"/>
3582                         <field name="xact" reporter:datatype="link"/>
3583                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3584                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3585                 </fields>
3586                 <links>
3587                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3588                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3589                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3590                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3591                 </links>
3592         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3593             <actions>
3594                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3595                     <context link="xact" jump="usr" field="home_ou"/>
3596                 </retrieve>
3597                         </actions>
3598                 </permacrud>
3599         </class>
3600         <class id="mfp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
3601                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3602                         <field name="accepting_usr" reporter:datatype="link"/>
3603                         <field name="amount" reporter:datatype="money" />
3604                         <field name="amount_collected" reporter:datatype="money" />
3605                         <field name="id" reporter:datatype="id" />
3606                         <field name="note"  reporter:datatype="text"/>
3607                         <field name="payment_ts" reporter:datatype="timestamp"/>
3608                         <field name="xact" reporter:datatype="link"/>
3609                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3610                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3611                 </fields>
3612                 <links>
3613                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3614                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3615                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3616                 </links>
3617         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3618             <actions>
3619                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3620                     <context link="xact" jump="usr" field="home_ou"/>
3621                 </retrieve>
3622                         </actions>
3623                 </permacrud>
3624         </class>
3625         <class id="map" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
3626                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3627                         <field name="accepting_usr" reporter:datatype="link"/>
3628                         <field name="amount" reporter:datatype="money" />
3629                         <field name="amount_collected" reporter:datatype="money" />
3630                         <field name="id" reporter:datatype="id" />
3631                         <field name="note"  reporter:datatype="text"/>
3632                         <field name="payment_ts" reporter:datatype="timestamp"/>
3633                         <field name="xact" reporter:datatype="link"/>
3634                         <field name="billing" reporter:datatype="link"/>
3635                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3636                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3637                 </fields>
3638                 <links>
3639                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3640                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3641                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3642                         <link field="billing" reltype="might_have" key="id" class="mb"/>
3643                 </links>
3644         </class>
3645         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3646                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3647                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3648                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3649                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3650                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3651                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3652                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3653                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3654                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3655                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3656                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3657                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3658                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3659                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3660                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3661                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3662                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3663                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3664                 </fields>
3665                 <links>
3666                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3667                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3668                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3669                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3670                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3671                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3672                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3673                 </links>
3674         </class>
3675
3676         <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">
3677                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3678                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3679                         <field name="name"  reporter:datatype="text"/>
3680                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3681                         <field name="block_list" reporter:datatype="text"/>
3682                         <field name="staff_alert" reporter:datatype="bool"/>
3683                         <field name="org_depth" reporter:datatype="int"/>
3684                 </fields>
3685                 <links/>
3686         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3687             <actions>
3688                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3689                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3690                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3691                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3692             </actions>
3693         </permacrud>
3694         </class>
3695         <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">
3696                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3697                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3698                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3699                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3700                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3701                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3702                 </fields>
3703                 <links>
3704                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3705                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3706                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3707         </links>
3708         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3709             <actions>
3710                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3711                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3712                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3713                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3714             </actions>
3715         </permacrud>
3716         </class>
3717         <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">
3718                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3719                         <field name="holdable" reporter:datatype="bool"/>
3720                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3721                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3722                         <field name="opac_visible" reporter:datatype="bool"/>
3723             <field name="copy_active" reporter:datatype="bool"/>
3724             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3725                 </fields>
3726                 <links/>
3727         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3728             <actions>
3729                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3730                 <retrieve/>
3731                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3732                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3733             </actions>
3734         </permacrud>
3735         </class>
3736         <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">
3737                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3738                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3739                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3740                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3741                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3742                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3743                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3744                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3745                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3746                 </fields>
3747                 <links>
3748                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3749                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3750                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3751                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3752                 </links>
3753                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3754                         <actions>
3755                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3756                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3757                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3758                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3759                         </actions>
3760                 </permacrud>
3761         </class>
3762         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3763                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3764                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3765                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3766                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3767                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3768                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3769                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3770                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3771                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3772                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3773                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3774                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3775                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3776                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3777                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3778                 </fields>
3779                 <links>
3780                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3781                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3782                 </links>
3783         </class>
3784         <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">
3785                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3786                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3787                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3788                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3789                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3790                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3791                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3792                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3793                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3794                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3795                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3796                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3797                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3798                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3799                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3800                 </fields>
3801                 <links>
3802                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3803                 </links>
3804                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3805                         <actions>
3806                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3807                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3808                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3809                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3810                         </actions>
3811                 </permacrud>
3812         </class>
3813
3814
3815         <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">
3816                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3817                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3818                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3819                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3820                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3821                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3822                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3823                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3824                 </fields>
3825                 <links>
3826                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3827                 </links>
3828         </class>
3829
3830         <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">
3831                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3832                         <field name="call_number" />
3833                         <field name="create_date" reporter:datatype="timestamp"/>
3834                         <field name="creator" reporter:datatype="link"/>
3835                         <field name="id" reporter:datatype="id" />
3836                         <field name="pub" reporter:datatype="bool"/>
3837                         <field name="title"  reporter:datatype="text"/>
3838                         <field name="value"  reporter:datatype="text"/>
3839                 </fields>
3840                 <links>
3841                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3842                 </links>
3843         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3844             <actions>
3845                 <create permission="CREATE_VOLUME_NOTE">
3846                     <context link="call_number" field="owning_lib"/>
3847                 </create>
3848                 <retrieve permission="VIEW_VOLUME_NOTES">
3849                     <context link="call_number" field="owning_lib"/>
3850                 </retrieve>
3851                 <update permission="UPDATE_VOLUME_NOTE">
3852                     <context link="call_number" field="owning_lib"/>
3853                 </update>
3854                 <delete permission="DELETE_VOLUME_NOTE">
3855                     <context link="call_number" field="owning_lib"/>
3856                 </delete>
3857             </actions>
3858         </permacrud>
3859         </class>
3860         <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">
3861                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3862                         <field name="create_date" reporter:datatype="timestamp"/>
3863                         <field name="creator" reporter:datatype="link"/>
3864                         <field name="edit_date" reporter:datatype="timestamp"/>
3865                         <field name="editor" reporter:datatype="link"/>
3866                         <field name="id" reporter:datatype="id" />
3867                         <field name="record" reporter:datatype="link"/>
3868                         <field name="value" reporter:datatype="text"/>
3869                 </fields>
3870                 <links>
3871                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3872                 </links>
3873         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3874             <actions>
3875                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3876                 <retrieve/>
3877                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3878                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3879             </actions>
3880         </permacrud>
3881         </class>
3882         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3883         <oils_persist:source_definition>
3884 SELECT  usr,
3885         SUM(
3886             CASE
3887                 WHEN (
3888                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3889                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3890                 ) THEN 1
3891                 ELSE 0
3892             END
3893         ) AS out,
3894
3895         SUM(
3896             CASE
3897                 WHEN (
3898                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3899                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3900                 ) THEN 1
3901                 ELSE 0
3902             END
3903         ) AS overdue,
3904
3905         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3906         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
3907         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3908   FROM  action.circulation
3909   WHERE checkin_time IS NULL
3910   GROUP BY 1
3911         </oils_persist:source_definition>
3912         <fields oils_persist:primary="usr">
3913             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3914             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3915             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3916             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3917             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3918             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3919         </fields>
3920         <links>
3921             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3922         </links>
3923         </class>
3924         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3925         <oils_persist:source_definition>
3926 SELECT  usr,
3927         STRING_AGG(
3928             CASE
3929                 WHEN (
3930                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3931                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3932                 ) THEN id::TEXT
3933                 ELSE '0'
3934             END
3935         ,',') AS out,
3936
3937         STRING_AGG(
3938             CASE
3939                 WHEN (
3940                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3941                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3942                 ) THEN id::TEXT
3943                 ELSE '0'
3944             END
3945         ,',') AS overdue,
3946
3947         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
3948         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
3949         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
3950   FROM  action.circulation
3951   WHERE checkin_time IS NULL
3952   GROUP BY 1
3953         </oils_persist:source_definition>
3954         <fields oils_persist:primary="usr">
3955             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3956             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3957             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3958             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3959             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3960             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3961         </fields>
3962         <links>
3963             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3964         </links>
3965         </class>
3966         <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">
3967                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3968                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3969                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3970                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3971                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3972                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3973                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3974                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3975                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3976                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3977                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3978                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3979                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3980                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3981                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3982                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3983                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3984                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3985                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3986                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3987                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3988                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3989                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3990                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3991                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3992                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
3993                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3994                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3995                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3996                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3997                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3998                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3999                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4000                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4001                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4002                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4003                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4004                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4005                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4006                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4007                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4008                 </fields>
4009                 <links>
4010                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4011                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4012                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4013                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4014                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4015                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4016                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4017                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4018                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4019                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4020                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4021                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4022                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4023                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4024                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4025                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4026                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4027                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4028                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4029                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4030                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4031                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4032                 </links>
4033                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4034                         <actions>
4035                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4036                         </actions>
4037                 </permacrud>
4038         </class>
4039         <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">
4040                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4041                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4042                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4043                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4044                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4045                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4046                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4047                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4048                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4049                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4050                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4051                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4052                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4053                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4054                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4055                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4056                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4057                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4058                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4059                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4060                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4061                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4062                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4063                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4064                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4065                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4066                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4067                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4068                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4069                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4070                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4071                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4072                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4073                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4074                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4075                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4076                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4077                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4078                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4079                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4080                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4081                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4082                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4083                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4084                 </fields>
4085                 <links>
4086                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4087                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4088                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4089                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4090                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4091                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4092                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4093                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4094                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4095                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4096                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4097                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
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="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4101                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4102                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4103                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4104                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4105                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4106                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4107                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4108                 </links>
4109         </class>
4110         <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">
4111                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4112                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4113                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4114                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4115                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4116                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4117                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4118                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4119                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4120                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4121                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4122                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4123                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4124                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4125                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4126                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4127                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4128                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4129                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4130                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4131                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4132                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4133                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4134                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4135                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4136                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4137                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4138                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4139                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4140                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4141                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4142                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4143                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4144                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4145                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4146                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4147                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4148                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4149                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4150                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4151                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4152                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4153                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4154                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4155                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4156                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4157                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4158                 </fields>
4159                 <links>
4160                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4161                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4162                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4163                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4164                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4165                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4166                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4167                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4168                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4169                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4170                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4171                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4172                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4173                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4174                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4175                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4176                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4177                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4178                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4179                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4180                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4181                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4182                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4183                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4184                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4185                 </links>
4186         </class>
4187
4188         <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">
4189                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4190                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4191                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4192                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4193                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4194                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4195                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4196                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4197                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4198                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4199                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4200                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4201                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4202                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4203                 </fields>
4204                 <links>
4205                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4206                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4207                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4208                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4209                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4210                 </links>
4211                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4212                         <actions>
4213                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4214                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4215                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4216                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4217                         </actions>
4218                 </permacrud>
4219         </class>
4220
4221         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4222                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4223                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4224                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4225                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4226                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4227                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4228                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4229                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4230                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4231                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4232                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4233                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4234                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4235                 </fields>
4236                 <links>
4237                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4238                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4239                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4240                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4241                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4242                 </links>
4243                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4244                         <actions>
4245                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4246                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4247                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4248                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4249                         </actions>
4250                 </permacrud>
4251         </class>
4252         
4253         <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">
4254                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4255                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4256                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4257                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
4258                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
4259                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
4260                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
4261                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4262                 </fields>
4263                 <links>
4264                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4265                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
4266                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
4267                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4268                 </links>
4269                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4270                         <actions>
4271                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4272                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4273                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4274                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4275                         </actions>
4276                 </permacrud>
4277         </class>
4278         
4279         <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">
4280                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4281                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4282                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4283                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4284                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4285                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4286                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4287                 </fields>
4288                 <links>
4289                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4290                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4291                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4292                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4293                 </links>
4294                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4295                         <actions>
4296                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4297                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4298                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4299                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4300                         </actions>
4301                 </permacrud>
4302         </class>
4303         
4304         <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">
4305                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4306                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4307                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4308                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4309                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4310                 </fields>
4311                 <links>
4312                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4313                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4314                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4315                 </links>
4316                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4317                         <actions>
4318                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4319                     <context link="resource" field="owner" />
4320                 </create>
4321                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4322                     <context link="resource" field="owner" />
4323                 </retrieve>
4324                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4325                     <context link="resource" field="owner" />
4326                 </update>
4327                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4328                     <context link="resource" field="owner" />
4329                 </delete>
4330                         </actions>
4331                 </permacrud>
4332         </class>
4333         
4334         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4335                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4336                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4337                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4338                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4339                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4340                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4341                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4342                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4343                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4344                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4345                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4346                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4347                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4348                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4349                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4350                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4351                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4352                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4353                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4354                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4355                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4356                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4357                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4358                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4359                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4360                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4361                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4362                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4363                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4364                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4365                 </fields>
4366                 <links>
4367                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4368                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4369                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4370                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4371                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4372                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4373                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4374                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4375                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4376                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4377                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4378                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4379                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4380                 </links>
4381                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4382                         <actions>
4383                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4384                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4385                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4386                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4387                         </actions>
4388                 </permacrud>
4389         </class>
4390         
4391         <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">
4392                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4393                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4394                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4395                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4396                 </fields>
4397                 <links>
4398                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4399                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4400                 </links>
4401                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4402                         <actions>
4403                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4404                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4405                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4406                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4407                         </actions>
4408                 </permacrud>
4409         </class>
4410
4411         <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">
4412                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4413                         <field name="bucket" reporter:datatype="link"/>
4414                         <field name="id" reporter:datatype="id" />
4415                         <field name="target_call_number" reporter:datatype="link" />
4416                         <field name="create_time" reporter:datatype="timestamp" />
4417                         <field name="pos" reporter:datatype="int" />
4418                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4419                 </fields>
4420                 <links>
4421                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4422                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4423             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4424                 </links>
4425         </class>
4426         <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">
4427                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4428                         <field name="id" reporter:datatype="id" />
4429                         <field name="item" reporter:datatype="link"/>
4430                         <field name="note" reporter:datatype="text" />
4431                 </fields>
4432                 <links>
4433                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4434                 </links>
4435         </class>
4436         <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">
4437                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4438                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4439                         <field name="btype" reporter:datatype="text"/>
4440                         <field name="id" reporter:datatype="id" />
4441                         <field name="name" reporter:datatype="text"/>
4442                         <field name="description" reporter:datatype="text"/>
4443                         <field name="owner" reporter:datatype="link"/>
4444                         <field name="pub" reporter:datatype="bool"/>
4445                         <field name="create_time" reporter:datatype="timestamp" />
4446                 </fields>
4447                 <links>
4448                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4449                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4450                 </links>
4451         </class>
4452         <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">
4453                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4454                         <field name="id" reporter:datatype="id" />
4455                         <field name="bucket" reporter:datatype="link"/>
4456                         <field name="note" reporter:datatype="text" />
4457                 </fields>
4458                 <links>
4459                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4460                 </links>
4461         </class>
4462         <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">
4463                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4464                         <field name="hold" reporter:datatype="link"/>
4465                         <field name="id" reporter:datatype="id" />
4466                         <field name="target_copy" reporter:datatype="link"/>
4467                         <field name="proximity" reporter:datatype="number"/>
4468                 </fields>
4469                 <links>
4470                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4471                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4472                 </links>
4473         </class>
4474         <class id="ahn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
4475                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4476                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4477                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4478                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4479                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4480                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4481                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4482                 </fields>
4483                 <links>
4484                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4485                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4486                 </links>
4487         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4488             <actions>
4489                 <create permission="CREATE_HOLD_NOTIFICATION">
4490                                         <context link="hold" jump="usr" field="home_ou" />
4491                                 </create>
4492                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
4493                                         <context link="hold" jump="usr" field="home_ou" />
4494                                 </retrieve>
4495                 <update permission="CREATE_HOLD_NOTIFICATION">
4496                                         <context link="hold" jump="usr" field="home_ou" />
4497                                 </update>
4498                 <delete permission="CREATE_HOLD_NOTIFICATION">
4499                                         <context link="hold" jump="usr" field="home_ou" />
4500                                 </delete>
4501             </actions>
4502         </permacrud>
4503         </class>
4504         <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"  oils_persist:field_safe="true">
4505                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4506                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4507                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4508                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4509                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4510                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4511                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4512                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4513                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4514                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4515                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4516                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4517                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4518                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
4519                 </fields>
4520                 <links>
4521                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4522                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4523                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4524                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4525                 </links>
4526         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4527             <actions>
4528                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4529                 <retrieve/>
4530                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4531                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4532             </actions>
4533         </permacrud>
4534         </class>
4535         <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">
4536                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4537                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4538                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4539                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4540                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4541             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4542             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4543             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4544                 </fields>
4545                 <links>
4546                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4547                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4548                 </links>
4549         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4550             <actions>
4551                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4552                 <retrieve/>
4553                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4554                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4555             </actions>
4556         </permacrud>
4557         </class>
4558         <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">
4559                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4560                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4561             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4562             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4563                 </fields>
4564                 <links>
4565                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4566                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4567                 </links>
4568         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4569             <actions>
4570                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4571                                         <context link="lgroup" field="owner" />
4572                 </create>
4573                 <retrieve/>
4574                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4575                                         <context link="lgroup" field="owner" />
4576                 </update>
4577                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4578                                         <context link="lgroup" field="owner" />
4579                 </delete>
4580             </actions>
4581         </permacrud>
4582         </class>
4583
4584     <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">
4585         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4586             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4587             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4588             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4589             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4590         </fields>
4591         <links>
4592             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4593             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4594         </links>
4595         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4596             <actions>
4597                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4598                 <retrieve/>
4599                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4600                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4601             </actions>
4602         </permacrud>
4603     </class>
4604
4605         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4606                 <fields>
4607                         <field name="sre_id" oils_persist:virtual="true" />
4608                         <field name="location" oils_persist:virtual="true" />
4609                         <field name="owning_lib" oils_persist:virtual="true" />
4610                         <field name="basic_holdings" oils_persist:virtual="true" />
4611                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4612                         <field name="supplement_holdings" oils_persist:virtual="true" />
4613                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4614                         <field name="index_holdings" oils_persist:virtual="true" />
4615                         <field name="index_holdings_add" oils_persist:virtual="true" />
4616                         <field name="online" oils_persist:virtual="true" />
4617                         <field name="missing" oils_persist:virtual="true" />
4618                         <field name="incomplete" oils_persist:virtual="true" />
4619                 </fields>
4620         </class>
4621
4622         <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">
4623                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4624                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4625                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4626                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4627                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4628                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4629                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4630                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4631                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4632                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4633                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4634                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4635                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4636                 </fields>
4637                 <links>
4638                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4639                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4640                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4641                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4642                 </links>
4643                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4644                         <actions>
4645                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4646                                 <retrieve/>
4647                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4648                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4649                         </actions>
4650                 </permacrud>
4651         </class>
4652
4653         <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">
4654                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4655                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4656                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4657                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4658                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4659                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4660                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4661                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4662                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4663                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4664                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4665                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4666                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4667                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4668                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4669                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4670                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4671                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4672                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4673                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4674                 </fields>
4675                 <links>
4676                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4677                 </links>
4678                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4679                         <actions>
4680                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4681                                         <context link="subscription" field="owning_lib" />
4682                                 </create>
4683                                 <retrieve />
4684                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4685                                         <context link="subscription" field="owning_lib" />
4686                                 </update>
4687                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4688                                         <context link="subscription" field="owning_lib" />
4689                                 </delete>
4690                         </actions>
4691                 </permacrud>
4692         </class>
4693
4694         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4695                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4696                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4697                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4698                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4699                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4700                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4701                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4702                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4703                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4704                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4705                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4706                 </fields>
4707                 <links>
4708                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4709                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4710                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4711                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4712                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4713                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4714                 </links>
4715                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4716                         <actions>
4717                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4718                                 <retrieve />
4719                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4720                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4721                         </actions>
4722                 </permacrud>
4723         </class>
4724
4725         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4726                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4727                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4728                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4729                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4730                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4731                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4732                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4733                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4734                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4735                 </fields>
4736                 <links>
4737                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4738                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4739                 </links>
4740         </class>
4741
4742         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4743                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4744                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4745                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4746                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4747                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4748                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4749                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4750                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4751                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4752                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4753                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4754                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4755                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4756                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4757                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4758                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4759                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4760                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4761                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4762                 </fields>
4763                 <links>
4764                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4765                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4766                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4767                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4768                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4769                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4770                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4771                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4772                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4773                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4774                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4775                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4776                 </links>
4777                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4778                         <actions>
4779                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4780                                 <retrieve />
4781                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4782                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4783                         </actions>
4784                 </permacrud>
4785         </class>
4786
4787         <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">
4788                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4789                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4790                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4791                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4792                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4793                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4794                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4795                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4796                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4797                 </fields>
4798                 <links>
4799                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4800                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4801                 </links>
4802                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4803                         <actions>
4804                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4805                                         <context link="distribution" field="holding_lib" />
4806                                 </create>
4807                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4808                                         <context link="distribution" field="holding_lib" />
4809                                 </retrieve>
4810                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4811                                         <context link="distribution" field="holding_lib" />
4812                                 </update>
4813                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4814                                         <context link="distribution" field="holding_lib" />
4815                                 </delete>
4816                         </actions>
4817                 </permacrud>
4818         </class>
4819
4820         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4821                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4822                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4823                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4824                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4825                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4826                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4827                 </fields>
4828                 <links>
4829                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4830                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4831                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4832                 </links>
4833                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4834                         <actions>
4835                                 <create permission="ADMIN_SERIAL_STREAM">
4836                                         <context link="distribution" field="holding_lib" />
4837                                 </create>
4838                                 <retrieve />
4839                                 <update permission="ADMIN_SERIAL_STREAM">
4840                                         <context link="distribution" field="holding_lib" />
4841                                 </update>
4842                                 <delete permission="ADMIN_SERIAL_STREAM">
4843                                         <context link="distribution" field="holding_lib" />
4844                                 </delete>
4845                         </actions>
4846                 </permacrud>
4847         </class>
4848
4849         <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">
4850                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4851                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4852                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4853                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4854                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4855                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4856                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4857                 </fields>
4858                 <links>
4859                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4860                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4861                 </links>
4862                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4863                         <actions>
4864                                 <create permission="ADMIN_SERIAL_STREAM">
4865                                         <context link="stream" jump="distribution" field="holding_lib" />
4866                                 </create>
4867                                 <retrieve permission="RECEIVE_SERIAL">
4868                                         <context link="stream" jump="distribution" field="holding_lib" />
4869                                 </retrieve>
4870                                 <update permission="ADMIN_SERIAL_STREAM">
4871                                         <context link="stream" jump="distribution" field="holding_lib" />
4872                                 </update>
4873                                 <delete permission="ADMIN_SERIAL_STREAM">
4874                                         <context link="stream" jump="distribution" field="holding_lib" />
4875                                 </delete>
4876                         </actions>
4877                 </permacrud>
4878         </class>
4879
4880         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4881                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4882                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4883                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4884                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4885                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4886                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4887                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4888                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4889                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4890                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4891                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4892                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4893                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4894                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4895                 </fields>
4896                 <links>
4897                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4898                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4899                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4900                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4901                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4902                 </links>
4903                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4904                         <actions>
4905                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4906                                         <context link="subscription" field="owning_lib" />
4907                                 </create>
4908                                 <retrieve/>
4909                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4910                                         <context link="subscription" field="owning_lib" />
4911                                 </update>
4912                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4913                                         <context link="subscription" field="owning_lib" />
4914                                 </delete>
4915                         </actions>
4916                 </permacrud>
4917         </class>
4918
4919         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4920                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4921                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4922                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4923                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4924                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4925                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4926                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4927                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4928                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4929                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4930                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4931                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4932                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4933                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4934                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4935                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4936                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4937                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4938                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4939                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4940                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4941                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4942                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4943                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4944                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4945                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4946                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4947                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4948                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4949                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4950                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4951                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4952                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
4953                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4954                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4955                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4956                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4957                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4958                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4959                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4960                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4961                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4962                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4963                 </fields>
4964                 <links>
4965                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4966                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4967                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4968                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4969                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4970                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4971                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4972                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4973                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4974                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4975                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4976                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4977                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4978                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4979                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
4980                 </links>
4981                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4982                         <actions>
4983                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4984                                 <retrieve/>
4985                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4986                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4987                         </actions>
4988                 </permacrud>
4989         </class>
4990
4991         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4992                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4993                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4994                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4995                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4996                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4997                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4998                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4999                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5000                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5001                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5002                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5003                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5004                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5005                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5006                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5007                 </fields>
5008                 <links>
5009                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5010                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5011                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5012                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5013                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5014                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5015                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5016                 </links>
5017                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5018                         <actions>
5019                                 <create permission="ADMIN_SERIAL_ITEM">
5020                                         <context link="stream" jump="distribution" field="holding_lib" />
5021                                 </create>
5022                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5023                                         <context link="stream" jump="distribution" field="holding_lib" />
5024                                 </retrieve>
5025                                 <update permission="ADMIN_SERIAL_ITEM">
5026                                         <context link="stream" jump="distribution" field="holding_lib" />
5027                                 </update>
5028                                 <delete permission="ADMIN_SERIAL_ITEM">
5029                                         <context link="stream" jump="distribution" field="holding_lib" />
5030                                 </delete>
5031                         </actions>
5032                 </permacrud>
5033         </class>
5034
5035         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
5036                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5037                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5038                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5039                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5040                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5041                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5042                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5043                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5044                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5045                 </fields>
5046                 <links>
5047                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5048                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5049                 </links>
5050                 <!-- Not available via PCRUD at this time -->
5051         </class>
5052         <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">
5053                 <fields>
5054                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5055                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5056                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5057                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5058                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5059                 </fields>
5060                 <links>
5061                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5062                 </links>
5063         </class>
5064         <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">
5065                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5066                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5067                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5068                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5069                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5070                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5071                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5072                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5073                 </fields>
5074                 <links>
5075                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5076                 </links>
5077         </class>
5078         <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">
5079                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5080                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5081                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5082                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5083                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5084                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5085                 </fields>
5086                 <links>
5087                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5088                 </links>
5089                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5090                         <actions>
5091                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5092                                         <context link="distribution" field="holding_lib" />
5093                                 </create>
5094                                 <retrieve/>
5095                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5096                                         <context link="distribution" field="holding_lib" />
5097                                 </update>
5098                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5099                                         <context link="distribution" field="holding_lib" />
5100                                 </delete>
5101                         </actions>
5102                 </permacrud>
5103         </class>
5104
5105         <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">
5106                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5107                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5108                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5109                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5110                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5111                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5112                 </fields>
5113                 <links>
5114                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5115                 </links>
5116                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5117                         <actions>
5118                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5119                                         <context link="distribution" field="holding_lib" />
5120                                 </create>
5121                                 <retrieve/>
5122                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5123                                         <context link="distribution" field="holding_lib" />
5124                                 </update>
5125                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5126                                         <context link="distribution" field="holding_lib" />
5127                                 </delete>
5128                         </actions>
5129                 </permacrud>
5130         </class>
5131
5132         <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">
5133                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5134                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5135                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5136                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5137                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5138                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5139                 </fields>
5140                 <links>
5141                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5142                 </links>
5143                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5144                         <actions>
5145                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5146                                         <context link="distribution" field="holding_lib" />
5147                                 </create>
5148                                 <retrieve/>
5149                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5150                                         <context link="distribution" field="holding_lib" />
5151                                 </update>
5152                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5153                                         <context link="distribution" field="holding_lib" />
5154                                 </delete>
5155                         </actions>
5156                 </permacrud>
5157         </class>
5158
5159         <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">
5160                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5161                         <field name="id" reporter:datatype="id" />
5162                         <field name="owning_copy" reporter:datatype="link"/>
5163                         <field name="stat_cat" reporter:datatype="link"/>
5164                         <field name="stat_cat_entry" reporter:datatype="link"/>
5165                 </fields>
5166                 <links>
5167                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5168                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5169                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5170                 </links>
5171         </class>
5172         <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">
5173                 <fields oils_persist:primary="code">
5174                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5175                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5176                 </fields>
5177                 <links/>
5178         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5179             <actions>
5180                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5181                 <retrieve/>
5182                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5183                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
5184             </actions>
5185         </permacrud>
5186         </class>
5187         <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">
5188                 <fields oils_persist:primary="code">
5189                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
5190                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5191                 </fields>
5192                 <links/>
5193         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5194             <actions>
5195                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5196                 <retrieve/>
5197                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5198                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5199             </actions>
5200         </permacrud>
5201         </class>
5202         <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">
5203                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
5204                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
5205                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
5206                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
5207                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
5208                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
5209                 </fields>
5210                 <links>
5211             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5212         </links>
5213         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5214             <actions>
5215                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5216                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5217                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5218                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5219             </actions>
5220         </permacrud>
5221         </class>
5222         <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">
5223                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
5224                         <field name="id" reporter:datatype="id" />
5225                         <field name="name" reporter:datatype="text"/>
5226                 </fields>
5227                 <links/>
5228         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5229             <actions>
5230                 <create permission="CREATE_LASSO" global_required="true"/>
5231                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
5232                 <update permission="UPDATE_LASSO" global_required="true"/>
5233                 <delete permission="DELETE_LASSO" global_required="true"/>
5234             </actions>
5235         </permacrud>
5236         </class>
5237         <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">
5238                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
5239                         <field name="id" reporter:datatype="id" />
5240                         <field name="lasso" reporter:datatype="link"/>
5241                         <field name="org_unit" reporter:datatype="org_unit"/>
5242                 </fields>
5243                 <links>
5244                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
5245                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5246                 </links>
5247         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5248             <actions>
5249                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
5250                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
5251                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
5252                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
5253             </actions>
5254         </permacrud>
5255         </class>
5256         <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">
5257                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
5258                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5259                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
5260                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
5261                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
5262                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
5263                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
5264                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
5265                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
5266                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
5267                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
5268                 </fields>
5269                 <links>
5270                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5271                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5272                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5273                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
5274                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
5275                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5276                 </links>
5277         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5278             <actions>
5279                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5280                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5281                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5282                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5283             </actions>
5284         </permacrud>
5285         </class>
5286         <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">
5287                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5288                         <field name="id" reporter:datatype="id" />
5289                         <field name="from_org" reporter:datatype="org_unit"/>
5290                         <field name="to_org" reporter:datatype="org_unit"/>
5291                         <field name="prox" reporter:datatype="int" />
5292                 </fields>
5293                 <links>
5294                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5295                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5296                 </links>
5297         </class>
5298         <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">
5299                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5300                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5301                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5302                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5303                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5304                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5305                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5306                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5307                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5308                 </fields>
5309                 <links/>
5310         </class>
5311         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5312                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5313                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5314                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5315                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5316                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5317                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5318                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5319                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5320                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5321                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5322                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5323                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5324                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5325                 </fields>
5326                 <links>
5327                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5328                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5329                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5330                 </links>
5331         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5332             <actions>
5333                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5334                 <retrieve/>
5335                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5336                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5337             </actions>
5338         </permacrud>
5339         </class>
5340         <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">
5341                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5342                         <field name="address_type"  reporter:datatype="text"/>
5343                         <field name="city"  reporter:datatype="text"/>
5344                         <field name="country"  reporter:datatype="text"/>
5345                         <field name="county"  reporter:datatype="text"/>
5346                         <field name="id" reporter:datatype="id" />
5347                         <field name="org_unit" reporter:datatype="org_unit"/>
5348                         <field name="post_code"  reporter:datatype="text"/>
5349                         <field name="state"  reporter:datatype="text"/>
5350                         <field name="street1"  reporter:datatype="text"/>
5351                         <field name="street2"  reporter:datatype="text"/>
5352                         <field name="valid" reporter:datatype="bool"/>
5353                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5354                 </fields>
5355                 <links>
5356                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5357                 </links>
5358         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5359             <actions>
5360                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5361                 <retrieve/>
5362                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5363                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5364             </actions>
5365         </permacrud>
5366         </class>
5367         <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">
5368                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5369                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5370                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5371                         <field name="query_text" reporter:datatype="text"/>
5372                 </fields>
5373         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5374             <actions>
5375                 <retrieve/>
5376             </actions>
5377         </permacrud>
5378         </class>
5379
5380         <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">
5381                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5382                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5383                         <field name="owner" reporter:datatype="org_unit"/>
5384                         <field name="code" reporter:datatype="text"/>
5385                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5386                         <field name="create_date" reporter:datatype="timestamp"/>
5387                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5388                 </fields>
5389                 <links>
5390                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5391                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5392                 </links>
5393         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5394             <actions>
5395                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5396                 <retrieve/>
5397                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5398                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5399             </actions>
5400         </permacrud>
5401         </class>
5402         <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">
5403                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5404                         <field name="id" reporter:datatype="id"/>
5405                         <field name="grp" reporter:datatype="link"/>
5406                         <field name="pos" reporter:datatype="int"/>
5407                         <field name="query" reporter:datatype="link"/>
5408                 </fields>
5409                 <links>
5410                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5411                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5412                 </links>
5413         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5414             <actions>
5415                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5416                     <context link="grp" field="owner"/>
5417                 </create>
5418                 <retrieve/>
5419                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5420                     <context link="grp" field="owner"/>
5421                 </update>
5422                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5423                     <context link="grp" field="owner"/>
5424                 </delete>
5425             </actions>
5426         </permacrud>
5427         </class>
5428
5429         <!-- A note: Please update alhr and ahopl when updating ahr -->
5430         <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">
5431                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5432                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5433                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5434                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5435                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5436                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5437                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5438                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5439                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5440                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5441                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5442                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5443                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5444                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5445                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5446                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5447                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5448                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5449                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5450                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5451                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5452                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5453                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5454                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5455                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5456                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5457                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5458                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5459                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5460                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5461                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5462                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5463                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5464                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5465                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5466                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5467                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5468                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5469                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5470                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5471                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5472                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5473                 </fields>
5474                 <links>
5475                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5476                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5477                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5478                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5479                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5480                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5481                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5482                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5483                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5484                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5485                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5486                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5487                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5488                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5489                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5490                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5491                 </links>
5492                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5493                         <actions>
5494                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5495                         </actions>
5496                 </permacrud>
5497         </class>
5498         <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">
5499                 <oils_persist:source_definition><![CDATA[
5500                 SELECT
5501                         ahr.*,
5502                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5503                                 copy_location_order_position,
5504                         CASE WHEN au.alias IS NOT NULL THEN
5505                                 au.alias
5506                         ELSE
5507                                 au.first_given_name
5508                         END AS usr_alias_or_first_given_name,
5509                         au.first_given_name AS usr_first_given_name,
5510                         au.second_given_name AS usr_second_given_name,
5511                         au.family_name AS usr_family_name,
5512                         au.prefix AS usr_prefix,
5513                         au.suffix AS usr_suffix,
5514                         au.alias AS usr_alias,
5515                         CASE WHEN au.alias IS NOT NULL THEN
5516                                 au.alias
5517                         ELSE
5518                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5519                                         COALESCE(au.family_name, ''),
5520                                         COALESCE(au.suffix, ''),
5521                                         ', ',
5522                                         COALESCE(au.prefix, ''),
5523                                         COALESCE(au.first_given_name, ''),
5524                                         COALESCE(au.second_given_name, '')
5525                                 ], ' '), E'\\s+,', ',')
5526                         END AS usr_alias_or_display_name,
5527                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5528                                 COALESCE(au.family_name, ''),
5529                                 COALESCE(au.suffix, ''),
5530                                 ', ',
5531                                 COALESCE(au.prefix, ''),
5532                                 COALESCE(au.first_given_name, ''),
5533                                 COALESCE(au.second_given_name, '')
5534                         ], ' '), E'\\s+,', ',') AS usr_display_name,
5535                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5536                                 AS call_number_label,
5537                         siss.label AS issuance_label,
5538                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5539                         ahcm_1.copy_count AS potential_copies
5540                 FROM action.hold_request ahr
5541                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5542                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5543                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5544                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5545                 JOIN actor.usr au ON (au.id = ahr.usr)
5546                 JOIN (
5547                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5548                         FROM asset.copy_location
5549                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5550                 LEFT JOIN actor.usr_standing_penalty ausp 
5551                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5552                 LEFT JOIN config.standing_penalty csp
5553                         ON (
5554                                 csp.id = ausp.standing_penalty AND 
5555                                 csp.block_list LIKE '%CAPTURE%' AND (
5556                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5557                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5558                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5559                                         )
5560                                 )
5561                         )
5562                 JOIN (
5563                         SELECT COUNT(target_copy) AS copy_count, hold
5564                         FROM action.hold_copy_map
5565                         GROUP BY 2
5566                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5567                 LEFT JOIN serial.issuance siss
5568                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5569                 LEFT JOIN asset.copy_location_order acplo
5570                         ON (acp.location = acplo.location AND
5571                                 acp.circ_lib = acplo.org)
5572                 WHERE
5573                         ahr.capture_time IS NULL AND
5574                         ahr.cancel_time IS NULL AND
5575                         csp.id IS NULL AND
5576                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
5577                         acp.status IN (0,7)
5578                 ]]></oils_persist:source_definition>
5579                 <fields oils_persist:primary="id">
5580                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5581                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5582                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5583                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5584                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5585                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5586                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5587                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5588                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5589                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5590                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5591                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5592                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5593                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5594                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5595                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5596                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5597                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5598                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5599                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5600                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5601                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5602                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5603                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5604                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5605                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5606                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5607                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5608                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5609                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5610                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5611                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5612                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5613                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5614                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5615                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5616                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5617                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5618                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5619                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5620                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5621                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
5622                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
5623                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
5624                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
5625                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
5626                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
5627                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5628                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
5629                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
5630                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5631                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5632                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5633                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5634                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5635                 </fields>
5636                 <links>
5637                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5638                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5639                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5640                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5641                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5642                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5643                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5644                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5645                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5646                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5647                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5648                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5649                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5650                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5651                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5652                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5653                 </links>
5654                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5655                         <actions>
5656                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5657                         </actions>
5658                 </permacrud>
5659         </class>
5660         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5661                 <oils_persist:source_definition>
5662                         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)
5663                 </oils_persist:source_definition>
5664                 <fields oils_persist:primary="id">
5665                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5666                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5667                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5668                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5669                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5670                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5671                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5672                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5673                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5674                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5675                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5676                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5677                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5678                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5679                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5680                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5681                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5682                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5683                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5684                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5685                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5686                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5687                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5688                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5689                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5690                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5691                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5692                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5693                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5694                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5695                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5696                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5697                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5698                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5699                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5700                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5701                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5702                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5703                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5704                 </fields>
5705                 <links>
5706                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5707                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5708                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5709                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5710                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5711                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5712                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5713                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5714                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5715                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5716                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5717                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5718                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5719                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5720                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5721                 </links>
5722         </class>
5723
5724         <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">
5725                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5726                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5727                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5728                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5729                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5730                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5731                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5732                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5733                 </fields>
5734                 <links>
5735                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5736                 </links>
5737                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5738                         <actions>
5739                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5740                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5741                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5742                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5743                         </actions>
5744                 </permacrud>
5745         </class>
5746         <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">
5747                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5748                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5749                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5750                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5751                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5752                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5753                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5754                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5755                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5756                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5757                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5758                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5759                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5760                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5761                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5762                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5763                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5764                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5765                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5766                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5767                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5768                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5769                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5770                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5771                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5772                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5773                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5774                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5775                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5776                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5777                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5778                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5779                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5780                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5781                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5782                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5783                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5784                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5785                 </fields>
5786                 <links>
5787                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5788                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5789                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5790                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5791                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5792                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5793                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5794                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5795                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5796                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5797                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5798                 </links>
5799                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5800                         <actions>
5801                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5802                         </actions>
5803                 </permacrud>
5804         </class>
5805         <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">
5806                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5807                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5808                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5809                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5810                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5811                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5812                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5813                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5814                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5815                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5816                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5817                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5818                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5819                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5820                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5821                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5822                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5823                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5824                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5825                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5826                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5827                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5828                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5829                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5830                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5831                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5832                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5833                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5834                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5835                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5836                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5837                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5838                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5839                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5840                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5841                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5842                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5843                 </fields>
5844                 <links>
5845                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5846                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5847                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5848                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5849                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5850                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5851                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5852                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5853                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5854                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5855                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5856                 </links>
5857                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5858                         <actions>
5859                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5860                         </actions>
5861                 </permacrud>
5862         </class>
5863
5864         <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">
5865                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
5866                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
5867                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
5868                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
5869                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
5870                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
5871                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
5872                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5873                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
5874                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
5875                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
5876                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5877                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
5878                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5879                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
5880                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
5881                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
5882                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5883                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
5884                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
5885                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
5886                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
5887                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5888                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
5889                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
5890                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
5891                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
5892                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5893                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5894                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5895                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
5896                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
5897                 </fields>
5898                 <links>
5899                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
5900                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
5901                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
5902                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
5903                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
5904                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
5905                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5906                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
5907                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
5908                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
5909                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
5910                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
5911                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
5912                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
5913                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
5914                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
5915                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
5916                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
5917                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
5918                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
5919                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
5920                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
5921                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
5922                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
5923                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
5924                 </links>
5925         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5926             <actions>
5927                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
5928                 <retrieve />
5929                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
5930                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
5931             </actions>
5932         </permacrud>
5933         </class>
5934         <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">
5935                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
5936                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5937                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
5938                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
5939                 </fields>
5940                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5941                         <actions>
5942                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5943                                 <retrieve/>
5944                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5945                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5946                         </actions>
5947                 </permacrud>
5948         </class>
5949         <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">
5950                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
5951                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5952                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
5953                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
5954                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
5955                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
5956                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
5957                 </fields>
5958                 <links>
5959                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
5960                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5961                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
5962                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
5963                 </links>
5964                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5965                         <actions>
5966                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5967                                 <retrieve/>
5968                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5969                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5970                         </actions>
5971                 </permacrud>
5972         </class>
5973         <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">
5974                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
5975                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5976                         <field name="btype" reporter:datatype="text"/>
5977                         <field name="id" reporter:datatype="id" />
5978                         <field name="name"  reporter:datatype="text"/>
5979                         <field name="description" reporter:datatype="text"/>
5980                         <field name="owner" reporter:datatype="link"/>
5981                         <field name="pub" reporter:datatype="bool"/>
5982                         <field name="create_time" reporter:datatype="timestamp" />
5983                 </fields>
5984                 <links>
5985                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5986                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
5987                 </links>
5988         </class>
5989         <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">
5990                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
5991                         <field name="id" reporter:datatype="id" />
5992                         <field name="bucket" reporter:datatype="link"/>
5993                         <field name="note" reporter:datatype="text" />
5994                 </fields>
5995                 <links>
5996                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5997                 </links>
5998         </class>
5999         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
6000                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6001                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6002                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6003                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6004                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6005                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6006                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6007                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6008                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6009                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6010                 </fields>
6011                 <links>
6012                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6013                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6014                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6015                 </links>
6016         </class>
6017         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6018                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6019                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6020                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6021                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6022                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6023                 </fields>
6024                 <links>
6025                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6026                 </links>
6027                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6028                         <actions>
6029                                 <retrieve permission="VIEW_USER">
6030                                         <context link="usr" field="home_ou" />
6031                                 </retrieve>
6032                         </actions>
6033                 </permacrud>
6034         </class>
6035     <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">
6036         <fields oils_persist:primary="field">
6037             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6038             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6039             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6040         </fields>
6041         <links/>
6042         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6043             <actions>
6044                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6045                 <retrieve />
6046                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6047                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6048             </actions>
6049         </permacrud>
6050     </class>
6051         <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">
6052                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6053                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6054                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6055                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6056                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6057                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6058                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6059                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6060                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6061                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6062                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6063                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6064                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6065                 </fields>
6066                 <links>
6067                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6068                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6069                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6070                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6071                 </links>
6072         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6073             <actions>
6074                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6075                 <retrieve />
6076                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6077                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6078             </actions>
6079         </permacrud>
6080         </class>
6081         <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">
6082                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6083                         <field name="field" reporter:datatype="link"/>
6084                         <field name="id" reporter:datatype="id" />
6085                         <field name="source" reporter:datatype="link"/>
6086                         <field name="value"  reporter:datatype="text"/>
6087                 </fields>
6088                 <links>
6089                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6090                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6091                 </links>
6092         </class>
6093         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
6094                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6095                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6096                         <field name="btype" reporter:datatype="text"/>
6097                         <field name="id" reporter:datatype="id" />
6098                         <field name="name"  reporter:datatype="text"/>
6099                         <field name="description" reporter:datatype="text"/>
6100                         <field name="owner" reporter:datatype="link"/>
6101                         <field name="pub" reporter:datatype="bool"/>
6102                         <field name="create_time" reporter:datatype="timestamp" />
6103                 </fields>
6104                 <links>
6105                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6106                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
6107                 </links>
6108         </class>
6109         <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">
6110                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
6111                         <field name="id" reporter:datatype="id" />
6112                         <field name="bucket" reporter:datatype="link"/>
6113                         <field name="note" reporter:datatype="text" />
6114                 </fields>
6115                 <links>
6116                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6117                 </links>
6118         </class>
6119         <class id="mcrp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
6120                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6121                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6122                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6123                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6124                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
6125                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
6126                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6127                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6128                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
6129                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6130                 </fields>
6131                 <links>
6132                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6133                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6134                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6135                 </links>
6136         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6137             <actions>
6138                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6139                     <context link="xact" jump="usr" field="home_ou"/>
6140                 </retrieve>
6141                         </actions>
6142                 </permacrud>
6143         </class>
6144         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
6145                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
6146                         <field name="id" reporter:datatype="id" />
6147                         <field name="ind1" />
6148                         <field name="ind2" />
6149                         <field name="record" />
6150                         <field name="subfield" />
6151                         <field name="tag" />
6152                         <field name="value" />
6153                 </fields>
6154                 <links>
6155                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
6156                 </links>
6157         </class>
6158         <class id="aalink" controller="open-ils.cstore" oils_obj:fieldmapper="authority::authority_linking" oils_persist:tablename="authority.authority_linking" reporter:label="Authority to Authority Linking">
6159                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
6160                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6161                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
6162                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
6163                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
6164                 </fields>
6165                 <links>
6166                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
6167                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
6168                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
6169                 </links>
6170         </class>
6171         <class id="cnct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::non_cataloged_type" oils_persist:tablename="config.non_cataloged_type" reporter:label="Non-cataloged Type">
6172                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
6173                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
6174                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6175                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
6176                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6177                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
6178                 </fields>
6179                 <links>
6180                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6181                 </links>
6182         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6183             <actions>
6184                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6185                 <retrieve/>
6186                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6187                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6188             </actions>
6189         </permacrud>
6190
6191         </class>
6192         <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">
6193                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
6194                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6195                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
6196                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
6197                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
6198                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6199                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6200                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
6201                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
6202                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
6203                 </fields>
6204                 <links>
6205                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
6206                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
6207                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
6208                 </links>
6209         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6210             <actions>
6211                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
6212                 <retrieve/>
6213                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
6214                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
6215             </actions>
6216         </permacrud>
6217         </class>
6218         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
6219                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
6220                         <field name="create_date" reporter:datatype="timestamp"/>
6221                         <field name="creator" reporter:datatype="link"/>
6222                         <field name="edit_date" reporter:datatype="timestamp"/>
6223                         <field name="editor" reporter:datatype="link"/>
6224                         <field name="id" reporter:datatype="id" />
6225                         <field name="pub" reporter:datatype="bool"/>
6226                         <field name="record" reporter:datatype="link"/>
6227                         <field name="value"  reporter:datatype="text"/>
6228                 </fields>
6229                 <links>
6230                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6231                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6232                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6233                 </links>
6234         </class>
6235         <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">
6236                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6237                         <field name="balance_owed" reporter:datatype="money" />
6238                         <field name="total_owed" reporter:datatype="money" />
6239                         <field name="total_paid" reporter:datatype="money" />
6240                         <field name="usr" reporter:datatype="link"/>
6241                 </fields>
6242                 <links>
6243                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6244                 </links>
6245         </class>
6246         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
6247                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6248                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
6249                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6250                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
6251                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6252                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
6253                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
6254                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6255                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6256                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6257                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6258                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6259                 </fields>
6260                 <links>
6261                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6262                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6263                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6264                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6265                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6266                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6267                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6268                 </links>
6269         </class>
6270         <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">
6271                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
6272                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
6273                         <field name="quality" reporter:datatype="int" />
6274                         <field name="source" reporter:datatype="text"/>
6275                         <field name="transcendant" reporter:datatype="bool"/>
6276                         <field name="can_have_copies" reporter:datatype="bool"/>
6277                 </fields>
6278                 <links/>
6279         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6280             <actions>
6281                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
6282                 <retrieve/>
6283                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
6284                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
6285             </actions>
6286         </permacrud>
6287         </class>
6288         <class id="mbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
6289                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6290                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6291                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6292                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6293                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6294                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
6295                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
6296                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6297                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6298                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6299                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6300                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6301                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
6302                 </fields>
6303                 <links>
6304                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
6305                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6306                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6307                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6308                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6309                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6310                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6311                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
6312                 </links>
6313                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6314                         <actions>
6315                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6316                                         <context link="usr" field="home_ou" />
6317                                 </retrieve>
6318                         </actions>
6319                 </permacrud>
6320         </class>
6321         <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">
6322                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6323                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6324                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6325                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6326                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6327                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6328                 </fields>
6329                 <links>
6330                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6331                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6332                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6333                 </links>
6334         </class>
6335         <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">
6336                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6337                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6338                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6339                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6340                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6341                 </fields>
6342                 <links>
6343                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6344                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6345                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6346                 </links>
6347         </class>
6348         <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">
6349                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6350                         <field name="bucket" reporter:datatype="link"/>
6351                         <field name="id" reporter:datatype="id" />
6352                         <field name="target_user" reporter:datatype="link"/>
6353                         <field name="create_time" reporter:datatype="timestamp" />
6354                         <field name="pos" reporter:datatype="int" />
6355                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6356                 </fields>
6357                 <links>
6358                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6359                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6360             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6361                 </links>
6362         </class>
6363         <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">
6364                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6365                         <field name="id" reporter:datatype="id" />
6366                         <field name="item" reporter:datatype="link"/>
6367                         <field name="note" reporter:datatype="text" />
6368                 </fields>
6369                 <links>
6370                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6371                 </links>
6372         </class>
6373         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6374                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6375                         <field name="balance_owed" reporter:datatype="money" />
6376                         <field name="total_owed" reporter:datatype="money" />
6377                         <field name="total_paid" reporter:datatype="money" />
6378                         <field name="usr" reporter:datatype="link"/>
6379                 </fields>
6380                 <links>
6381                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6382                 </links>
6383         </class>
6384         <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">
6385                 <fields oils_persist:primary="code" oils_persist:sequence="">
6386                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6387                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6388                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6389                 </fields>
6390                 <links/>
6391         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6392             <actions>
6393                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6394                 <retrieve/>
6395                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6396                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6397             </actions>
6398         </permacrud>
6399         </class>
6400         <class id="mwp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
6401                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6402                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6403                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6404                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6405                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6406                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6407                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6408                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6409                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6410                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6411                 </fields>
6412                 <links>
6413                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6414                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6415                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6416                 </links>
6417         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6418             <actions>
6419                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6420                     <context link="xact" jump="usr" field="home_ou"/>
6421                 </retrieve>
6422                         </actions>
6423                 </permacrud>
6424         </class>
6425         <class id="mgp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
6426                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6427                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6428                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6429                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6430                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6431                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6432                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6433                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6434                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6435                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6436                 </fields>
6437                 <links>
6438                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6439                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6440                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6441                 </links>
6442         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6443             <actions>
6444                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6445                     <context link="xact" jump="usr" field="home_ou"/>
6446                 </retrieve>
6447                         </actions>
6448                 </permacrud>
6449         </class>
6450         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
6451                 <fields oils_persist:primary="id" oils_persist:sequence="">
6452                         <field name="checkin_lib" reporter:datatype="link"/>
6453                         <field name="checkin_staff" reporter:datatype="link"/>
6454                         <field name="checkin_time" reporter:datatype="timestamp"/>
6455                         <field name="circ_lib"  reporter:datatype="org_unit"/>
6456                         <field name="circ_staff" reporter:datatype="link"/>
6457                         <field name="desk_renewal" reporter:datatype="bool"/>
6458                         <field name="due_date" reporter:datatype="timestamp"/>
6459                         <field name="duration" reporter:datatype="interval"/>
6460                         <field name="duration_rule" reporter:datatype="link"/>
6461                         <field name="fine_interval" reporter:datatype="interval"/>
6462                         <field name="id" reporter:datatype="id" />
6463                         <field name="max_fine" reporter:datatype="money" />
6464                         <field name="max_fine_rule" reporter:datatype="link"/>
6465                         <field name="opac_renewal" reporter:datatype="bool"/>
6466                         <field name="phone_renewal" reporter:datatype="bool"/>
6467                         <field name="recurring_fine" reporter:datatype="money" />
6468                         <field name="recurring_fine_rule" reporter:datatype="link"/>
6469                         <field name="renewal_remaining" reporter:datatype="int" />
6470             <field name="grace_period" reporter:datatype="interval" />
6471                         <field name="stop_fines" reporter:datatype="text"/>
6472                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
6473                         <field name="target_copy" reporter:datatype="link"/>
6474                         <field name="usr" reporter:datatype="link"/>
6475                         <field name="xact_finish" reporter:datatype="timestamp" />
6476                         <field name="xact_start" reporter:datatype="timestamp" />
6477                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6478                 </fields>
6479                 <links>
6480                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6481                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6482                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6483                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6484                 </links>
6485         </class>
6486         <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">
6487                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
6488                         <field name="field" reporter:datatype="link"/>
6489                         <field name="id" reporter:datatype="id" />
6490                         <field name="source" reporter:datatype="link"/>
6491                         <field name="value" reporter:datatype="text"/>
6492                 </fields>
6493                 <links>
6494                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6495                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6496                 </links>
6497         </class>
6498         <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">
6499                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6500                         <field name="high" reporter:datatype="money" />
6501                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6502                         <field name="low" reporter:datatype="money" />
6503                         <field name="name" reporter:datatype="text"/>
6504                         <field name="normal" reporter:datatype="money" />
6505                         <field name="recurrence_interval" reporter:datatype="interval"/>
6506             <field name="grace_period" reporter:datatype="interval" />
6507                 </fields>
6508                 <links/>
6509         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6510             <actions>
6511                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6512                 <retrieve/>
6513                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6514                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6515             </actions>
6516         </permacrud>
6517         </class>
6518         <class id="mckp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
6519                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6520                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6521                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6522                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6523                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6524                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6525                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6526                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6527                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6528                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6529                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6530                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6531                 </fields>
6532                 <links>
6533                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6534                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6535                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6536                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6537                 </links>
6538         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6539             <actions>
6540                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6541                     <context link="xact" jump="usr" field="home_ou"/>
6542                 </retrieve>
6543                         </actions>
6544                 </permacrud>
6545         </class>
6546         <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">
6547                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6548                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6549                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6550                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6551                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6552                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6553                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6554                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6555                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6556                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6557                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6558                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6559                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6560                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6561                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6562                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6563                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6564                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6565                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6566                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6567                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6568                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6569                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6570                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6571                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6572                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6573                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6574                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6575                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6576                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6577                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6578                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6579                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6580                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6581                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6582                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6583                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6584                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6585                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6586                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6587                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6588                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6589                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6590                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6591                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6592                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6593                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6594                 </fields>
6595                 <links>
6596                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6597                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6598                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6599                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6600                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6601                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6602                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6603                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6604                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6605                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6606                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6607                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6608                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
6609                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
6610                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6611                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6612                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6613                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6614                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6615                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6616                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6617                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6618                 </links>
6619         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6620             <actions>
6621                 <create permission="CREATE_COPY">
6622                     <context link="call_number" field="owning_lib"/>
6623                 </create>
6624                 <retrieve/>
6625                 <update permission="UPDATE_COPY">
6626                     <context link="call_number" field="owning_lib"/>
6627                 </update>
6628                 <delete permission="DELETE_COPY">
6629                     <context link="call_number" field="owning_lib"/>
6630                 </delete>
6631             </actions>
6632         </permacrud>
6633         </class>
6634
6635         <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">
6636                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6637                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6638                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6639                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6640                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6641                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6642                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6643                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6644                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6645                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6646                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6647                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6648                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6649                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6650                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6651                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6652                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6653                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6654                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6655                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6656                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6657                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6658                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6659                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6660                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6661                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6662                 </fields>
6663                 <links>
6664                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6665                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6666                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6667                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6668                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6669                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6670                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6671                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6672                 </links>
6673                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6674                         <actions>
6675                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6676                                 <retrieve />
6677                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6678                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6679                         </actions>
6680                 </permacrud>
6681         </class>
6682
6683         <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">
6684                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6685                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6686                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6687                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6688                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6689                 </fields>
6690                 <links/>
6691         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6692             <actions>
6693                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6694                 <retrieve/>
6695                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6696                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6697             </actions>
6698         </permacrud>
6699         </class>
6700         <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">
6701                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6702                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6703                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6704                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6705                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6706                 </fields>
6707                 <links/>
6708         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6709             <actions>
6710                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6711                 <retrieve/>
6712                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6713                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6714             </actions>
6715         </permacrud>
6716         </class>
6717         <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">
6718                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6719                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6720                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6721                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6722                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6723                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6724                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6725                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6726                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6727                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6728                 </fields>
6729                 <links>
6730                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6731                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6732                 </links>
6733         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6734             <actions>
6735                 <create permission="CREATE_PERM" global_required="true"/>
6736                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6737                 <update permission="UPDATE_PERM" global_required="true"/>
6738                 <delete permission="DELETE_PERM" global_required="true"/>
6739             </actions>
6740         </permacrud>
6741         </class>
6742         <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">
6743                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6744                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6745                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6746                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6747                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6748                 </fields>
6749                 <links>
6750                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6751                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6752                 </links>
6753         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6754             <actions>
6755                 <create permission="ADMIN_SURVEY">
6756                     <context link="question" jump="survey" field="owner"/>
6757                 </create>
6758                 <retrieve/>
6759                 <update permission="ADMIN_SURVEY">
6760                     <context link="question" jump="survey" field="owner"/>
6761                 </update>
6762                 <delete permission="ADMIN_SURVEY">
6763                     <context link="question" jump="survey" field="owner"/>
6764                 </delete>
6765             </actions>
6766         </permacrud>
6767         </class>
6768         <class id="ancc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::non_cataloged_circulation" oils_persist:tablename="action.non_cataloged_circulation" reporter:core="true" reporter:label="Non-cataloged Circulation">
6769                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6770                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6771                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6772                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6773                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6774                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6775                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6776                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6777                 </fields>
6778                 <links>
6779                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6780                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6781                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6782                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6783                 </links>
6784                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6785                         <actions>
6786                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
6787                         </actions>
6788                 </permacrud>
6789         </class>
6790         <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">
6791                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6792                         <field name="balance_owed" reporter:datatype="money" />
6793                         <field name="total_owed" reporter:datatype="money" />
6794                         <field name="total_paid" reporter:datatype="money" />
6795                         <field name="usr" reporter:datatype="link"/>
6796                 </fields>
6797                 <links>
6798                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6799                 </links>
6800         </class>
6801         <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">
6802                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
6803                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
6804                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
6805                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
6806                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
6807                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6808                 </fields>
6809                 <links>
6810                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6811                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6812                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6813                 </links>
6814         </class>
6815         <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">
6816                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
6817                         <field name="field" reporter:datatype="link"/>
6818                         <field name="id" reporter:datatype="id" />
6819                         <field name="source" reporter:datatype="link"/>
6820                         <field name="value" reporter:datatype="text"/>
6821                 </fields>
6822                 <links>
6823                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6824                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6825                 </links>
6826         </class>
6827         <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">
6828                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
6829                         <field name="field" reporter:datatype="link"/>
6830                         <field name="id" reporter:datatype="id" />
6831                         <field name="source" reporter:datatype="link"/>
6832                         <field name="value" reporter:datatype="text"/>
6833                 </fields>
6834                 <links>
6835                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6836                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6837                 </links>
6838         </class>
6839         <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">
6840                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
6841                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6842                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
6843                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
6844                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
6845                 </fields>
6846                 <links>
6847                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
6848                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6849                 </links>
6850         </class>
6851         <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">
6852                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
6853                         <field name="depth" reporter:datatype="int" />
6854                         <field name="grantable" reporter:datatype="bool"/>
6855                         <field name="grp" reporter:datatype="link"/>
6856                         <field name="id" reporter:datatype="id" />
6857                         <field name="perm" reporter:datatype="link"/>
6858                 </fields>
6859                 <links>
6860                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6861                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6862                 </links>
6863         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6864             <actions>
6865                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
6866                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
6867                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
6868                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
6869             </actions>
6870         </permacrud>
6871         </class>
6872         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
6873                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
6874                         <field name="items" oils_persist:virtual="true" />
6875                         <field name="btype" reporter:datatype="text"/>
6876                         <field name="id" reporter:datatype="id" />
6877                         <field name="name" reporter:datatype="text"/>
6878                         <field name="description" reporter:datatype="text"/>
6879                         <field name="owner" reporter:datatype="link"/>
6880                         <field name="pub" reporter:datatype="bool"/>
6881                         <field name="create_time" reporter:datatype="timestamp" />
6882                 </fields>
6883                 <links>
6884                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6885                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
6886                 </links>
6887         </class>
6888         <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">
6889                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
6890                         <field name="id" reporter:datatype="id" />
6891                         <field name="bucket" reporter:datatype="link"/>
6892                         <field name="note" reporter:datatype="text" />
6893                 </fields>
6894                 <links>
6895                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
6896                 </links>
6897         </class>
6898         <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">
6899                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
6900                         <field name="id" reporter:datatype="int" />
6901                         <field name="usr" reporter:datatype="link"/>
6902                         <field name="work_ou" reporter:datatype="link"/>
6903                 </fields>
6904                 <links>
6905                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6906                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
6907                 </links>
6908         </class>
6909         <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">
6910                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
6911                         <field name="depth" reporter:datatype="int"/>
6912                         <field name="grantable" reporter:datatype="bool"/>
6913                         <field name="id" reporter:datatype="id" />
6914                         <field name="perm" reporter:datatype="link"/>
6915                         <field name="usr" reporter:datatype="link"/>
6916                 </fields>
6917                 <links>
6918                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6919                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6920                 </links>
6921         </class>
6922         <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">
6923                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
6924                         <field name="object_id" reporter:datatype="text"/>
6925                         <field name="grantable" reporter:datatype="bool"/>
6926                         <field name="id" reporter:datatype="id" />
6927                         <field name="perm" reporter:datatype="link"/>
6928                         <field name="usr" reporter:datatype="link"/>
6929                         <field name="object_type" reporter:datatype="text"/>
6930                 </fields>
6931                 <links>
6932                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6933                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6934                 </links>
6935         </class>
6936         <class id="mp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:core="true" reporter:label="Payments: All">
6937                 <fields oils_persist:primary="id" oils_persist:sequence="">
6938                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6939                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6940                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6941                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6942                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6943                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6944                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6945                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6946                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6947                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6948                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6949                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6950                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6951                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6952                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
6953                 </fields>
6954                 <links>
6955                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6956                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6957                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6958                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6959                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6960                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6961                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6962                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="map"/>
6963                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6964                 </links>
6965         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6966             <actions>
6967                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6968                     <context link="xact" jump="usr" field="home_ou"/>
6969                 </retrieve>
6970                         </actions>
6971                 </permacrud>
6972         </class>
6973         <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">
6974                 <fields oils_persist:primary="id" oils_persist:sequence="">
6975                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6976                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6977                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6978                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6979                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6980                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6981                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
6982                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6983                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6984                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6985                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6986                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6987                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6988                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6989                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6990                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
6991                 </fields>
6992                 <links>
6993                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6994                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6995                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6996                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6997                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6998                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6999                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7000                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="mvp"/>
7001                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7002                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7003                 </links>
7004         </class>
7005         <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">
7006                 <fields oils_persist:primary="id" oils_persist:sequence="">
7007                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7008                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7009                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7010                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7011                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7012                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7013                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7014                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7015                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7016                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7017                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7018                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7019                 </fields>
7020                 <links>
7021                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7022                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7023                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7024                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7025                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="mvp"/>
7026                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7027                 </links>
7028         </class>
7029         <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">
7030                 <fields oils_persist:primary="id" oils_persist:sequence="">
7031                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7032                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7033                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7034                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7035                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7036                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7037                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7038                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
7039                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7040                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7041                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7042                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7043                 </fields>
7044                 <links>
7045                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7046                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7047                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7048                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7049                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7050                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7051                 </links>
7052         </class>
7053         <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">
7054                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
7055                         <field name="bucket" reporter:datatype="link"/>
7056                         <field name="id" reporter:datatype="id" />
7057                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
7058                         <field name="create_time" reporter:datatype="timestamp" />
7059                         <field name="pos" reporter:datatype="int" />
7060                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7061                 </fields>
7062                 <links>
7063                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
7064                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
7065             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
7066                 </links>
7067         </class>
7068         <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">
7069                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
7070                         <field name="id" reporter:datatype="id" />
7071                         <field name="item" reporter:datatype="link"/>
7072                         <field name="note" reporter:datatype="text" />
7073                 </fields>
7074                 <links>
7075                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
7076                 </links>
7077         </class>
7078         <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">
7079                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
7080                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
7081                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7082                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7083                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7084                 </fields>
7085                 <links>
7086                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
7087                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7088                 </links>
7089         </class>
7090     <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">
7091         <fields oils_persist:primary="field">
7092             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7093             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7094             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7095         </fields>
7096         <links/>
7097         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7098             <actions>
7099                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
7100                 <retrieve />
7101                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
7102                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
7103             </actions>
7104         </permacrud>
7105     </class>
7106         <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">
7107                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
7108                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
7109                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7110                 </fields>
7111                 <links/>
7112         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7113             <actions>
7114                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7115                 <retrieve/>
7116                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7117                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7118             </actions>
7119         </permacrud>
7120         </class>
7121
7122
7123         <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">
7124                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7125                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7126                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7127                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7128                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
7129                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7130                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7131                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7132                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7133                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7134                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7135                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7136                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7137                 </fields>
7138                 <links>
7139                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7140                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
7141                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7142                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7143                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7144                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7145                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
7146                 </links>
7147         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7148             <actions>
7149                 <create permission="TRANSIT_COPY">
7150                     <context link="target_copy" field="owner"/>
7151                 </create>
7152                 <retrieve/>
7153                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7154                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7155             </actions>
7156         </permacrud>
7157         </class>
7158         <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">
7159                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7160                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7161                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7162                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7163                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
7164                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7165                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7166                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7167                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7168                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7169                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7170                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7171                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7172                 </fields>
7173                 <links>
7174                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7175                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7176                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7177                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7178                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7179                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7180                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7181                 </links>
7182         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7183             <actions>
7184                 <create permission="TRANSIT_COPY" context_field="owner">
7185                     <context link="target_copy" field="circ_lib"/>
7186                 </create>
7187                 <retrieve/>
7188                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7189                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7190             </actions>
7191         </permacrud>
7192         </class>
7193         <class id="mb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
7194                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
7195                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7196                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
7197                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
7198                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
7199                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7200                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
7201                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7202                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
7203                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7204                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
7205                 </fields>
7206                 <links>
7207                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7208                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
7209                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
7210                 </links>
7211         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7212             <actions>
7213                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7214                     <context link="xact" jump="usr" field="home_ou"/>
7215                 </retrieve>
7216                         </actions>
7217                 </permacrud>
7218         </class>
7219         <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">
7220                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
7221                         <field name="grp" />
7222                         <field name="id" reporter:datatype="id" />
7223                         <field name="usr" />
7224                 </fields>
7225                 <links>
7226                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7227                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7228                 </links>
7229         </class>
7230         <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">
7231                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
7232                         <field name="id" reporter:datatype="id" />
7233                         <field name="fq_field" reporter:datatype="text"/>
7234                         <field name="identity_value" reporter:datatype="text"/>
7235                         <field name="translation" reporter:datatype="text"/>
7236                         <field name="string" reporter:datatype="text"/>
7237                 </fields>
7238                 <links>
7239                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
7240                 </links>
7241         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7242             <actions>
7243                 <create permission="CREATE_TRANSLATION" global_required="true"/>
7244                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
7245                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
7246                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
7247             </actions>
7248         </permacrud>
7249         </class>
7250         <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">
7251                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
7252                         <field name="id" reporter:datatype="id" />
7253                         <field name="fm_class" reporter:datatype="text"/>
7254                         <field name="field" reporter:datatype="text"/>
7255                         <field name="owner" reporter:datatype="org_unit"/>
7256                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
7257                 </fields>
7258                 <links>
7259                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7260                 </links>
7261         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7262             <actions>
7263                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7264                 <retrieve/>
7265                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7266                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7267             </actions>
7268         </permacrud>
7269         </class>
7270         <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">
7271                 <fields oils_persist:primary="code">
7272                         <field name="code" reporter:datatype="id" />
7273                         <field name="marc_code" reporter:datatype="text"/>
7274                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7275                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7276                 </fields>
7277                 <links/>
7278         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7279             <actions>
7280                 <create permission="CREATE_LOCALE" global_required="true"/>
7281                 <retrieve/>
7282                 <update permission="UPDATE_LOCALE" global_required="true"/>
7283                 <delete permission="DELETE_LOCALE" global_required="true"/>
7284             </actions>
7285         </permacrud>
7286         </class>
7287         <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">
7288                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
7289                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
7290                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
7291                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
7292             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
7293                 </fields>
7294                 <links>
7295                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7296                 </links>
7297         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7298             <actions>
7299                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
7300                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
7301                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
7302                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
7303             </actions>
7304         </permacrud>
7305         </class>
7306
7307         <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">
7308                 <fields oils_persist:primary="id">
7309                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7310                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7311                 </fields>
7312                 <links/>
7313         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7314             <actions>
7315                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7316                 <retrieve/>
7317                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7318                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7319             </actions>
7320         </permacrud>
7321         </class>
7322
7323         <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">
7324                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
7325                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7326                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7327                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
7328                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
7329                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
7330                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
7331                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
7332                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
7333                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7334                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
7335                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
7336                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
7337                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
7338                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
7339                         <field reporter:label="Title" name="title" reporter:datatype="text" />
7340                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
7341                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7342                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
7343                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
7344                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
7345                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
7346                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
7347                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
7348                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
7349                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7350                 </fields>
7351                 <links>
7352                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7353                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7354                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7355                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
7356                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
7357                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7358                 </links>
7359         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7360             <actions>
7361                 <create permission="user_request.create">
7362                     <context link="usr" field="home_ou"/>
7363                                 </create>
7364                 <retrieve permission="user_request.view">
7365                     <context link="usr" field="home_ou"/>
7366                                 </retrieve>
7367                 <update permission="user_request.update">
7368                     <context link="usr" field="home_ou"/>
7369                                 </update>
7370                 <delete permission="user_request.delete">
7371                     <context link="usr" field="home_ou"/>
7372                                 </delete>
7373             </actions>
7374         </permacrud>
7375         </class>
7376
7377         <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">
7378                 <fields oils_persist:primary="code">
7379                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
7380                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7381                 </fields>
7382                 <links/>
7383         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7384             <actions>
7385                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7386                 <retrieve/>
7387                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7388                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7389             </actions>
7390         </permacrud>
7391         </class>
7392
7393         <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">
7394                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
7395                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
7396                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
7397                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
7398                         <field reporter:label="Ratio" name="ratio" />
7399                 </fields>
7400                 <links>
7401                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
7402                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
7403                 </links>
7404                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7405                         <actions>
7406                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7407                                 <retrieve/>
7408                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7409                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7410                         </actions>
7411                 </permacrud>
7412         </class>
7413
7414         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
7415                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
7416                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7417                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7418                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7419                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7420                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7421                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
7422                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
7423                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
7424                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
7425                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7426                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7427                         <field reporter:label="URL" name="url" reporter:datatype="text" />
7428                         <field reporter:label="Email" name="email" reporter:datatype="text" />
7429                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
7430                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
7431                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
7432                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
7433                 </fields>
7434                 <links>
7435                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7436                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7437             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
7438             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
7439             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
7440                 </links>
7441         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7442             <actions>
7443                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
7444                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
7445                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
7446                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
7447             </actions>
7448         </permacrud>
7449         </class>
7450
7451         <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">
7452                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
7453                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7454                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7455                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7456                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7457                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7458                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7459                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7460                 </fields>
7461                 <links>
7462                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7463                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7464                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7465                 </links>
7466         </class>
7467
7468         <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">
7469                 <fields oils_persist:primary="code">
7470                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
7471                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7472                 </fields>
7473                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7474             <actions>
7475                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7476                 <retrieve/>
7477                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7478                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7479             </actions>
7480                 </permacrud>
7481         </class>
7482
7483         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
7484                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
7485                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
7486                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
7487                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7488                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
7489                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
7490                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
7491                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
7492                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
7493                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
7494                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
7495                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7496                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
7497                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
7498                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
7499                 </fields>
7500                 <links>
7501                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
7502                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7503                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
7504                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
7505                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
7506                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
7507                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
7508                 </links>
7509         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7510             <actions>
7511                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
7512                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
7513                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
7514                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
7515             </actions>
7516         </permacrud>
7517         </class>
7518
7519         <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">
7520                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
7521                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7522                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7523                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7524                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
7525                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
7526                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
7527                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7528                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
7529                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7530                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7531                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7532                 </fields>
7533                 <links>
7534                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7535                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7536                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7537                 </links>
7538         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7539             <actions>
7540                 <create   permission="ADMIN_INVOICE">
7541                                         <context link="invoice" field="receiver"/>
7542                                 </create>
7543                 <retrieve permission="ADMIN_INVOICE">
7544                                         <context link="invoice" field="receiver"/>
7545                                 </retrieve>
7546                 <update   permission="ADMIN_INVOICE">
7547                                         <context link="invoice" field="receiver"/>
7548                                 </update>
7549                                 <delete   permission="ADMIN_INVOICE">
7550                                         <context link="invoice" field="receiver"/>
7551                                 </delete>
7552             </actions>
7553         </permacrud>
7554         </class>
7555
7556         <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">
7557                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
7558                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7559                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7560                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7561                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7562                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7563                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7564                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7565                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7566                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7567                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7568                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7569                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7570                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7571                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7572                 </fields>
7573                 <links>
7574                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7575                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7576                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7577                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7578                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7579                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
7580                 </links>
7581         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7582             <actions>
7583                 <create   permission="ADMIN_INVOICE">
7584                                         <context link="invoice" field="receiver"/>
7585                                 </create>
7586                 <retrieve permission="ADMIN_INVOICE">
7587                                         <context link="invoice" field="receiver"/>
7588                                 </retrieve>
7589                 <update   permission="ADMIN_INVOICE">
7590                                         <context link="invoice" field="receiver"/>
7591                                 </update>
7592                                 <delete   permission="ADMIN_INVOICE">
7593                                         <context link="invoice" field="receiver"/>
7594                                 </delete>
7595             </actions>
7596         </permacrud>
7597         </class>
7598
7599         <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">
7600                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7601                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7602                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7603                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7604                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7605                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7606                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7607                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7608                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7609                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7610                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7611                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7612                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7613                 </fields>
7614                 <links>
7615                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7616                 </links>
7617         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7618             <actions>
7619                 <create permission="ADMIN_PROVIDER">
7620                     <context link="provider" field="owner"/>
7621                 </create>
7622                 <retrieve permission="ADMIN_PROVIDER">
7623                     <context link="provider" field="owner"/>
7624                 </retrieve>
7625                 <update permission="ADMIN_PROVIDER">
7626                     <context link="provider" field="owner"/>
7627                 </update>
7628                 <delete permission="ADMIN_PROVIDER">
7629                     <context link="provider" field="owner"/>
7630                 </delete>
7631             </actions>
7632         </permacrud>
7633         </class>
7634
7635         <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">
7636                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7637                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7638                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7639                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7640                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7641                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7642                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7643         </fields>
7644                 <links>
7645                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7646                 </links>
7647         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7648             <actions>
7649                 <create permission="ADMIN_PROVIDER">
7650                     <context link="provider" field="owner"/>
7651                 </create>
7652                 <retrieve permission="ADMIN_PROVIDER">
7653                     <context link="provider" field="owner"/>
7654                 </retrieve>
7655                 <update permission="ADMIN_PROVIDER">
7656                     <context link="provider" field="owner"/>
7657                 </update>
7658                 <delete permission="ADMIN_PROVIDER">
7659                     <context link="provider" field="owner"/>
7660                 </delete>
7661             </actions>
7662         </permacrud>
7663     </class>
7664         <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">
7665                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7666                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7667                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7668                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7669                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7670                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7671                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7672                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7673                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7674                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7675                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7676                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7677                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7678                 </fields>
7679                 <links>
7680                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7681                 </links>
7682         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7683             <actions>
7684                 <create permission="ADMIN_PROVIDER">
7685                     <context link="contact" jump='provider' field="owner"/>
7686                 </create>
7687                 <retrieve permission="ADMIN_PROVIDER">
7688                     <context link="contact" jump='provider' field="owner"/>
7689                 </retrieve>
7690                 <update permission="ADMIN_PROVIDER">
7691                     <context link="contact" jump='provider' field="owner"/>
7692                 </update>
7693                 <delete permission="ADMIN_PROVIDER">
7694                     <context link="contact" jump='provider' field="owner"/>
7695                 </delete>
7696             </actions>
7697         </permacrud>
7698         </class>
7699
7700         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7701                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7702                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7703                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7704                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7705                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7706                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7707                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7708                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7709                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7710                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7711                 </fields>
7712                 <links>
7713                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7714                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7715                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7716                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7717                 </links>
7718         </class>
7719
7720         <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">
7721                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7722                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7723                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7724                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7725                 </fields>
7726                 <links>
7727             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7728                 </links>
7729                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7730                         <actions>
7731                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7732                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7733                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7734                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7735                         </actions>
7736                 </permacrud>
7737         </class>
7738
7739         <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">
7740                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7741                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7742                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7743                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7744                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7745                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7746                 </fields>
7747                 <links>
7748                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7749                 </links>
7750                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7751                         <actions>
7752                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7753                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7754                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7755                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7756                         </actions>
7757                 </permacrud>
7758         </class>
7759
7760         <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">
7761                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7762                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7763                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7764                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7765                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7766                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7767                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7768                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7769                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7770                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7771                 </fields>
7772                 <links>
7773                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7774                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7775             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7776             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7777                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7778                 </links>
7779         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7780             <actions>
7781                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7782                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7783                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7784                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7785             </actions>
7786         </permacrud>
7787         </class>
7788
7789         <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">
7790                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
7791                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
7792                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
7793                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7794                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7795                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
7796                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
7797                 </fields>
7798                 <links>
7799                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7800                 </links>
7801                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7802                         <actions>
7803                                 <create permission="ADMIN_FUNDING_SOURCE">
7804                     <context link="funding_source" field="owner"/>
7805                 </create>
7806                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
7807                     <context link="funding_source" field="owner"/>
7808                 </retrieve>
7809                                 <update permission="ADMIN_FUNDING_SOURCE">
7810                     <context link="funding_source" field="owner"/>
7811                 </update>
7812                                 <delete permission="ADMIN_FUNDING_SOURCE">
7813                     <context link="funding_source" field="owner"/>
7814                 </delete>
7815                         </actions>
7816                 </permacrud>
7817         </class>
7818
7819         <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">
7820                 <fields oils_persist:primary="id">
7821                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
7822                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
7823                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
7824                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
7825                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
7826                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7827                 </fields>
7828                 <links>
7829                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7830                 </links>
7831         </class>
7832
7833         <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">
7834                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
7835                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
7836                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7837                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
7838                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
7839                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7840                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
7841                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
7842                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7843                 </fields>
7844                 <links>
7845                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7846                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7847                 </links>
7848                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7849                         <actions>
7850                                 <create permission="ADMIN_ACQ_FUND">
7851                     <context link="fund" field="org"/>
7852                 </create>
7853                                 <retrieve permission="ADMIN_ACQ_FUND">
7854                     <context link="fund" field="org"/>
7855                 </retrieve>
7856                                 <update permission="ADMIN_ACQ_FUND">
7857                     <context link="fund" field="org"/>
7858                 </update>
7859                                 <delete permission="ADMIN_ACQ_FUND">
7860                     <context link="fund" field="org"/>
7861                 </delete>
7862                         </actions>
7863                 </permacrud>
7864         </class>
7865
7866         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
7867                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7868                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7869                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7870                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7871                         <field reporter:label="Year" name="year" reporter:datatype="int" />
7872                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7873                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7874                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7875                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7876                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7877                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7878                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7879                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7880                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7881                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
7882                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7883                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
7884                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
7885                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
7886                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
7887                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7888                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7889                 </fields>
7890                 <links>
7891                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7892                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7893             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
7894             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
7895             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
7896             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
7897             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
7898             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
7899             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
7900             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
7901             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
7902                 </links>
7903         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
7904             <actions>
7905                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
7906                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7907                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
7908                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
7909             </actions>
7910         </permacrud>
7911         </class>
7912
7913         <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">
7914                 <fields oils_persist:primary="fund">
7915                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7916                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7917                 </fields>
7918                 <links>
7919                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7920                 </links>
7921         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7922             <actions>
7923                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7924                                         <context link="fund" field="org" />
7925                 </retrieve>
7926             </actions>
7927         </permacrud>
7928         </class>
7929
7930         <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">
7931                 <fields oils_persist:primary="fund">
7932                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7933                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
7934                 </fields>
7935                 <links>
7936                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7937                 </links>
7938         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7939             <actions>
7940                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7941                                         <context link="fund" field="org" />
7942                 </retrieve>
7943             </actions>
7944         </permacrud>
7945         </class>
7946
7947         <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">
7948                 <fields oils_persist:primary="fund">
7949                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7950                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
7951                 </fields>
7952                 <links>
7953                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7954                 </links>
7955         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7956             <actions>
7957                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7958                                         <context link="fund" field="org" />
7959                 </retrieve>
7960             </actions>
7961         </permacrud>
7962         </class>
7963
7964         <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">
7965                 <fields oils_persist:primary="fund">
7966                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7967                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7968                 </fields>
7969                 <links>
7970                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7971                 </links>
7972         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7973             <actions>
7974                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7975                                         <context link="fund" field="org" />
7976                 </retrieve>
7977             </actions>
7978         </permacrud>
7979         </class>
7980
7981         <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">
7982                 <fields oils_persist:primary="fund">
7983                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7984                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
7985                 </fields>
7986                 <links>
7987                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7988                 </links>
7989         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7990             <actions>
7991                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7992                                         <context link="fund" field="org" />
7993                 </retrieve>
7994             </actions>
7995         </permacrud>
7996         </class>
7997
7998    <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">
7999         <fields oils_persist:primary="fund">
8000             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8001             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8002         </fields>
8003         <links>
8004             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8005         </links>
8006     </class>
8007
8008    <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">
8009         <fields oils_persist:primary="fund">
8010             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8011             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
8012         </fields>
8013         <links>
8014             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8015         </links>
8016     </class>
8017
8018    <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">
8019         <fields oils_persist:primary="fund">
8020             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8021             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8022         </fields>
8023         <links>
8024             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8025         </links>
8026     </class>
8027
8028    <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">
8029         <fields oils_persist:primary="fund">
8030             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8031             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
8032         </fields>
8033         <links>
8034             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8035         </links>
8036     </class>
8037
8038    <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">
8039         <fields oils_persist:primary="fund">
8040             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8041             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
8042         </fields>
8043         <links>
8044             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8045         </links>
8046     </class>
8047
8048         <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">
8049                 <fields oils_persist:primary="funding_source">
8050                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8051                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
8052                 </fields>
8053                 <links>
8054                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8055                 </links>
8056         </class>
8057
8058         <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">
8059                 <fields oils_persist:primary="funding_source">
8060                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8061                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
8062                 </fields>
8063                 <links>
8064                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8065                 </links>
8066         </class>
8067
8068         <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">
8069                 <fields oils_persist:primary="funding_source">
8070                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8071                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
8072                 </fields>
8073                 <links>
8074                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8075                 </links>
8076         </class>
8077
8078         <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">
8079                 <fields oils_persist:primary="fund">
8080                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8081                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
8082                 </fields>
8083                 <links>
8084                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8085                 </links>
8086         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8087             <actions>
8088                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8089                                         <context link="fund" field="org" />
8090                 </retrieve>
8091             </actions>
8092         </permacrud>
8093     </class>
8094     <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">
8095         <oils_persist:source_definition><![CDATA[
8096             SELECT
8097                 acqf.*,
8098                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
8099                 COALESCE(acqfst.amount, 0.00) AS spent_total,
8100                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
8101                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
8102             FROM
8103                 acq.fund acqf
8104                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
8105                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
8106                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
8107                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
8108         ]]></oils_persist:source_definition>
8109         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8110             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8111             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8112             <field reporter:label="Name" name="name" reporter:datatype="text" />
8113             <field reporter:label="Year" name="year" reporter:datatype="int" />
8114             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8115             <field reporter:label="Code" name="code" reporter:datatype="text" />
8116             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8117             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8118             <field reporter:label="Active" name="active" reporter:datatype="bool" />
8119             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8120             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8121
8122             <!-- non fund-native fields -->
8123             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
8124             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
8125             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
8126             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
8127         </fields>
8128         <links>
8129             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
8130             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8131             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8132         </links>
8133         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8134             <actions>
8135                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8136             </actions>
8137         </permacrud>
8138         </class>
8139         <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">
8140                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
8141                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8142                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8143                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8144                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8145                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8146                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8147                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8148                 </fields>
8149                 <links>
8150                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8151                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8152                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8153                 </links>
8154                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8155                         <actions>
8156                                 <create permission="ADMIN_ACQ_FUND">
8157                     <context link="fund" field="org"/>
8158                 </create>
8159                                 <retrieve permission="ADMIN_ACQ_FUND">
8160                     <context link="fund" field="org"/>
8161                 </retrieve>
8162                                 <update permission="ADMIN_ACQ_FUND">
8163                     <context link="fund" field="org"/>
8164                 </update>
8165                                 <delete permission="ADMIN_ACQ_FUND">
8166                     <context link="fund" field="org"/>
8167                 </delete>
8168                         </actions>
8169                 </permacrud>
8170         </class>
8171
8172     <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">
8173         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
8174             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8175             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8176             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8177             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
8178             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
8179             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8180             <field reporter:label="Note" name="note" reporter:datatype="text" />
8181             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8182         </fields>
8183         <links>
8184             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8185             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8186             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8187         </links>
8188                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8189                         <actions>
8190                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8191                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8192                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8193                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8194                         </actions>
8195                 </permacrud>
8196     </class>
8197
8198         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
8199                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
8200                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
8201                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8202                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
8203                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8204                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8205                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8206                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
8207                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
8208                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8209                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8210                 </fields>
8211                 <links>
8212                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8213                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8214                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8215                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8216                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
8217                 </links>
8218                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8219                         <actions>
8220                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
8221                         </actions>
8222                 </permacrud>
8223         </class>
8224
8225         <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">
8226                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
8227                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8228                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
8229                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8230                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8231                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
8232                 </fields>
8233                 <links>
8234                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8235                 </links>
8236                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8237                         <actions>
8238                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8239                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
8240                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8241                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8242                         </actions>
8243                 </permacrud>
8244         </class>
8245
8246         <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">
8247                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
8248                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8249                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8250                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8251                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8252                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8253                         <field reporter:label="State" name="state" reporter:datatype="text" />
8254                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
8255                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8256                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8257                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
8258                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8259                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8260                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8261                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
8262                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8263                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
8264                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
8265                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
8266                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
8267                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
8268                 </fields>
8269                 <links>
8270                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8271                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8272                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8273                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
8274                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8275                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
8276                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
8277                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
8278                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8279                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8280                 </links>
8281                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8282                         <actions>
8283                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8284                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8285                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8286                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8287                         </actions>
8288                 </permacrud>
8289         </class>
8290
8291         <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">
8292                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
8293                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8294                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8295                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8296                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
8297                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8298                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8299                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8300                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8301                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8302                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8303                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8304                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8305                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
8306                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8307                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8308                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8309                 </fields>
8310                 <links>
8311                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
8312                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8313                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8314                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8315                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8316                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8317                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8318                 </links>
8319                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8320             <actions>
8321                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8322             </actions>
8323                 </permacrud>
8324         </class>
8325
8326         <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">
8327                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
8328                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8329                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8330                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8331                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8332                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8333                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8334                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
8335                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8336                 </fields>
8337                 <links>
8338                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8339                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8340                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8341                 </links>
8342                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8343             <actions>
8344                 <create permission="CREATE_PURCHASE_ORDER">
8345                     <context link="purchase_order" field="ordering_agency"/>
8346                 </create>
8347                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8348                     <context link="purchase_order" field="ordering_agency"/>
8349                 </retrieve>
8350                 <update permission="CREATE_PURCHASE_ORDER">
8351                     <context link="purchase_order" field="ordering_agency"/>
8352                 </update>
8353                 <delete permission="CREATE_PURCHASE_ORDER">
8354                     <context link="purchase_order" field="ordering_agency"/>
8355                 </delete>
8356             </actions>
8357                 </permacrud>
8358         </class>
8359
8360         <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">
8361                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
8362                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8363                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8364                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8365                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
8366                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
8367                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
8368                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8369                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
8370                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8371                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8372                 </fields>
8373                 <links>
8374                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8375                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8376                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8377                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8378                 </links>
8379                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8380             <actions>
8381                 <create permission="CREATE_PURCHASE_ORDER">
8382                     <context link="purchase_order" field="ordering_agency"/>
8383                 </create>
8384                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8385                     <context link="purchase_order" field="ordering_agency"/>
8386                 </retrieve>
8387                 <update permission="CREATE_PURCHASE_ORDER">
8388                     <context link="purchase_order" field="ordering_agency"/>
8389                 </update>
8390                 <delete permission="CREATE_PURCHASE_ORDER">
8391                     <context link="purchase_order" field="ordering_agency"/>
8392                 </delete>
8393             </actions>
8394                 </permacrud>
8395         </class>
8396
8397         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
8398                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
8399                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
8400                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
8401                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
8402                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8403                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8404                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8405                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8406                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
8407                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
8408                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
8409                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
8410                         <field reporter:label="State" name="state" reporter:datatype="text" />
8411                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8412                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8413                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
8414                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8415                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8416                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8417                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
8418                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
8419                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
8420                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
8421                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
8422                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
8423                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
8424                 </fields>
8425                 <links>
8426                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8427                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8428                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8429                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8430                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8431                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8432                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8433                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
8434                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
8435                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
8436                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8437                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
8438                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8439                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
8440                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
8441                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8442                 </links>
8443                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8444                         <actions>
8445                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
8446                                         <context link="purchase_order" field="ordering_agency"/>
8447                                         <context link="picklist" field="org_unit"/>
8448                                 </retrieve>
8449                         </actions>
8450                 </permacrud>
8451         </class>
8452
8453         <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">
8454                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
8455                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8456                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8457                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8458                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
8459                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8460                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8461                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
8462                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8463                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8464                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
8465                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
8466                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8467                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8468                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
8469                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
8470                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
8471                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8472                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
8473                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8474                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8475                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8476                 </fields>
8477                 <links>
8478                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
8479                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8480                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8481                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8482                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8483                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8484                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8485                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8486                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8487                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8488                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8489                 </links>
8490                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8491                         <actions>
8492                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8493                                         <context link="purchase_order" field="ordering_agency"/>
8494                                         <context link="picklist" field="org_unit"/>
8495                                 </retrieve>
8496                         </actions>
8497                 </permacrud>
8498         </class>
8499
8500         <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">
8501                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
8502                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
8503                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8504                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8505                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8506                 </fields>
8507                 <links>
8508                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8509                 </links>
8510                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8511                         <actions>
8512                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8513                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
8514                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8515                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8516                         </actions>
8517                 </permacrud>
8518         </class>
8519
8520         <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">
8521                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
8522                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
8523                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
8524                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8525                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8526                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8527                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8528                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8529                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
8530                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8531                 </fields>
8532                 <links>
8533                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8534                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8535                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8536                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
8537                 </links>
8538         </class>
8539
8540         <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">
8541                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
8542                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
8543                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
8544                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
8545                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
8546                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
8547                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
8548                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
8549                 </fields>
8550                 <links>
8551                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8552                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
8553                 </links>
8554         </class>
8555
8556         <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">
8557                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
8558                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
8559                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8560                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8561                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8562                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8563                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8564                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8565                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8566                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8567                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8568                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8569                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8570                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8571                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8572                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8573                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
8574                 </fields>
8575                 <links>
8576                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8577                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
8578                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8579                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8580                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8581                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8582                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8583                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8584                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
8585                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
8586                 </links>
8587         </class>
8588
8589         <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">
8590                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8591                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8592                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8593                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8594                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8595                 </fields>
8596                 <links/>
8597                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8598                         <actions>
8599                                 <retrieve />
8600                         </actions>
8601                 </permacrud>
8602         </class>
8603
8604         <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">
8605                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8606                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8607                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8608                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8609                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8610                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8611             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8612                 </fields>
8613                 <links/>
8614         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8615             <actions>
8616                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8617                 <retrieve />
8618                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8619                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8620             </actions>
8621         </permacrud>
8622         </class>
8623
8624         <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">
8625                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8626                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8627                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8628                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8629                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8630                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8631                 </fields>
8632                 <links/>
8633         </class>
8634         <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">
8635                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8636                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8637                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8638                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8639                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8640                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8641                 </fields>
8642                 <links>
8643                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8644                 </links>
8645         </class>
8646
8647         <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">
8648             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8649                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8650                 <field reporter:label="Code" name="code" reporter:datatype="text" />
8651                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8652                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8653                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8654                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8655         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8656
8657             </fields>
8658             <links>
8659                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8660             </links>
8661             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8662                 <actions>
8663                     <create permission="ADMIN_PROVIDER">
8664                         <context link="provider" field="owner"/>
8665                     </create>
8666                     <retrieve permission="ADMIN_PROVIDER">
8667                         <context link="provider" field="owner"/>
8668                     </retrieve>
8669                     <update permission="ADMIN_PROVIDER">
8670                         <context link="provider" field="owner"/>
8671                     </update>
8672                     <delete permission="ADMIN_PROVIDER">
8673                         <context link="provider" field="owner"/>
8674                     </delete>
8675                 </actions>
8676             </permacrud>
8677         </class>
8678         
8679         <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">
8680             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8681                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8682                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8683                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8684                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8685             </fields>
8686             <links>
8687                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8688             </links>
8689             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8690                 <actions>
8691                     <create permission="ADMIN_PROVIDER">
8692                         <context link="provider" field="owner"/>
8693                     </create>
8694                     <retrieve permission="ADMIN_PROVIDER">
8695                         <context link="provider" field="owner"/>
8696                     </retrieve>
8697                     <update permission="ADMIN_PROVIDER">
8698                         <context link="provider" field="owner"/>
8699                     </update>
8700                     <delete permission="ADMIN_PROVIDER">
8701                         <context link="provider" field="owner"/>
8702                     </delete>
8703                 </actions>
8704             </permacrud>
8705         </class>
8706         
8707         <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">
8708             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8709                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8710                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8711                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8712                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8713                 </fields>
8714                 <links/>
8715         </class>
8716
8717         <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">
8718                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8719                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8720                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8721                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8722                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8723                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8724                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8725                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8726                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8727                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8728                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8729                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8730                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8731                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8732                 </fields>
8733                 <links>
8734                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8735                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8736                 </links>
8737         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8738             <actions>
8739                 <create permission="ADMIN_PROVIDER">
8740                     <context link="provider" field="owner"/>
8741                 </create>
8742                 <retrieve permission="ADMIN_PROVIDER">
8743                     <context link="provider" field="owner"/>
8744                 </retrieve>
8745                 <update permission="ADMIN_PROVIDER">
8746                     <context link="provider" field="owner"/>
8747                 </update>
8748                 <delete permission="ADMIN_PROVIDER">
8749                     <context link="provider" field="owner"/>
8750                 </delete>
8751             </actions>
8752         </permacrud>
8753         </class>
8754
8755         <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">
8756                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8757                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8758                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8759                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8760                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8761                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8762                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8763                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8764                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8765                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8766                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8767                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8768                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8769                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8770                 </fields>
8771                 <links>
8772                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8773                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8774                 </links>
8775         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8776             <actions>
8777                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8778                     <context link="account" jump="provider" field="owner"/>
8779                 </retrieve>
8780                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8781                     <context link="account" jump="provider" field="owner"/>
8782                 </update>
8783                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8784                     <context link="account" jump="provider" field="owner"/>
8785                 </delete>
8786             </actions>
8787         </permacrud>
8788         </class>
8789
8790
8791         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
8792                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
8793                         <field name="id" reporter:datatype="id" />
8794                         <field name="parent" reporter:datatype="link"/>
8795                         <field name="owner" reporter:datatype="link"/>
8796                         <field name="create_time" reporter:datatype="timestamp"/>
8797                         <field name="name" reporter:datatype="text"/>
8798                         <field name="shared" reporter:datatype="bool"/>
8799                         <field name="share_with" reporter:datatype="link"/>
8800                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8801                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
8802                 </fields>
8803                 <links>
8804                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8805                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
8806                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
8807                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8808                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
8809                 </links>
8810         </class>
8811         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
8812                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
8813                         <field name="id" reporter:datatype="id" />
8814                         <field name="parent" reporter:datatype="link"/>
8815                         <field name="owner" reporter:datatype="link"/>
8816                         <field name="create_time" reporter:datatype="timestamp"/>
8817                         <field name="name" reporter:datatype="text"/>
8818                         <field name="shared" reporter:datatype="bool"/>
8819                         <field name="share_with" reporter:datatype="link"/>
8820                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8821                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
8822                 </fields>
8823                 <links>
8824                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8825                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
8826                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
8827                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8828                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
8829                 </links>
8830         </class>
8831         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
8832                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
8833                         <field name="id" reporter:datatype="id" />
8834                         <field name="parent" reporter:datatype="link"/>
8835                         <field name="owner" reporter:datatype="link"/>
8836                         <field name="create_time" reporter:datatype="timestamp"/>
8837                         <field name="name" reporter:datatype="text"/>
8838                         <field name="shared" reporter:datatype="bool"/>
8839                         <field name="share_with" reporter:datatype="link"/>
8840                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8841                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8842                 </fields>
8843                 <links>
8844                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8845                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
8846                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
8847                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8848                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
8849                 </links>
8850         </class>
8851         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
8852                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
8853                         <field name="id" reporter:datatype="id" />
8854                         <field name="owner" reporter:datatype="link"/>
8855                         <field name="create_time" reporter:datatype="timestamp"/>
8856                         <field name="name" reporter:datatype="text"/>
8857                         <field name="data" reporter:datatype="text"/>
8858                         <field name="folder" reporter:datatype="link"/>
8859                         <field name="description" reporter:datatype="text"/>
8860                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8861                 </fields>
8862                 <links>
8863                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8864                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
8865                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
8866                 </links>
8867         </class>
8868         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
8869                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
8870                         <field name="id" reporter:datatype="id" />
8871                         <field name="owner" reporter:datatype="link"/>
8872                         <field name="create_time" reporter:datatype="timestamp"/>
8873                         <field name="template" reporter:datatype="link"/>
8874                         <field name="data" reporter:datatype="text"/>
8875                         <field name="folder" reporter:datatype="link"/>
8876                         <field name="recur" reporter:datatype="bool"/>
8877                         <field name="recurrence" reporter:datatype="interval"/>
8878                         <field name="name" reporter:datatype="text"/>
8879                         <field name="description" reporter:datatype="text"/>
8880                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
8881                 </fields>
8882                 <links>
8883                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8884                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
8885                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
8886                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
8887                 </links>
8888         </class>
8889         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
8890                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
8891                         <field name="id" reporter:datatype="id" />
8892                         <field name="runner" reporter:datatype="link"/>
8893                         <field name="start_time" reporter:datatype="timestamp"/>
8894                         <field name="complete_time" reporter:datatype="timestamp"/>
8895                         <field name="run_time" reporter:datatype="timestamp"/>
8896                         <field name="email" reporter:datatype="text"/>
8897                         <field name="excel_format" reporter:datatype="bool"/>
8898                         <field name="csv_format" reporter:datatype="bool"/>
8899                         <field name="html_format" reporter:datatype="bool"/>
8900                         <field name="error_code" reporter:datatype="int"/>
8901                         <field name="error_text" reporter:datatype="text"/>
8902                         <field name="report" reporter:datatype="link"/>
8903                         <field name="folder" reporter:datatype="link"/>
8904                         <field name="chart_pie" reporter:datatype="bool"/>
8905                         <field name="chart_bar" reporter:datatype="bool"/>
8906                         <field name="chart_line" reporter:datatype="bool"/>
8907                 </fields>
8908                 <links>
8909                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
8910                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
8911                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
8912                 </links>
8913         </class>
8914         <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">
8915                 <fields oils_persist:primary="id">
8916                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8917                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8918                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8919                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8920                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8921                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8922                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8923                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8924                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8925                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8926                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8927                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8928                 </fields>
8929                 <links>
8930                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8931                 </links>
8932                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8933                         <actions>
8934                                 <retrieve />
8935                         </actions>
8936                 </permacrud>
8937         </class>
8938         <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">
8939                 <fields oils_persist:primary="id">
8940                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8941                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8942                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8943                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8944                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8945                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8946                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8947                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8948                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8949                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8950                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8951                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8952                 </fields>
8953                 <links>
8954                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8955                 </links>
8956         </class>
8957         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
8958                 <fields oils_persist:primary="id">
8959                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8960                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
8961                         <field reporter:label="Fingerprint" name="fingerprint" />
8962                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8963                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8964                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8965                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8966                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
8967                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8968                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8969                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8970                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
8971                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
8972                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
8973                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8974                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8975                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
8976                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
8977                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
8978                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
8979                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
8980                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
8981                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8982                 </fields>
8983                 <links>
8984                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
8985                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8986                 </links>
8987         </class>
8988         <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">
8989                 <fields oils_persist:primary="id">
8990                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
8991                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
8992                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
8993                 </fields>
8994                 <links>
8995                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
8996                 </links>
8997         </class>
8998         <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">
8999                 <fields oils_persist:primary="id">
9000                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
9001                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
9002                 </fields>
9003                 <links>
9004                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
9005                 </links>
9006         </class>
9007         <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">
9008                 <fields oils_persist:primary="id">
9009                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
9010                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
9011                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
9012                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
9013                 </fields>
9014                 <links>
9015                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
9016                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
9017                 </links>
9018         </class>
9019         <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">
9020                 <fields oils_persist:primary="xact">
9021                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9022                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
9023                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
9024                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
9025                 </fields>
9026                 <links>
9027                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9028                 </links>
9029         </class>
9030         <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">
9031                 <fields oils_persist:primary="xact">
9032                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9033                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
9034                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
9035                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
9036                 </fields>
9037                 <links>
9038                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9039                 </links>
9040         </class>
9041         <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)">
9042                 <fields oils_persist:primary="id">
9043                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
9044                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
9045                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
9046                 </fields>
9047                 <links>
9048                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9049                 </links>
9050         </class>
9051         <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">
9052                 <fields oils_persist:primary="id">
9053                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
9054                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
9055                 </fields>
9056                 <links>
9057                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9058                 </links>
9059         </class>
9060         <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">
9061                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
9062                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
9063                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
9064                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
9065                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
9066                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
9067                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
9068                 </fields>
9069                 <links>
9070                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9071                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
9072                 </links>
9073                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9074                         <actions>
9075                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9076                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9077                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9078                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9079                         </actions>
9080                 </permacrud>
9081         </class>
9082         <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">
9083                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
9084                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
9085                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
9086                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
9087                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9088                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9089                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
9090                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9091                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
9092                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
9093                 </fields>
9094                 <links>
9095                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9096                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9097                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9098                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9099                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9100                 </links>
9101                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9102                         <actions>
9103                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
9104                                         <context link="formula" field="owner"/>
9105                                 </create>
9106                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
9107                                         <context link="formula" field="owner"/>
9108                                 </retrieve>
9109                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
9110                                         <context link="formula" field="owner"/>
9111                                 </update>
9112                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
9113                                         <context link="formula" field="owner"/>
9114                                 </delete>
9115                         </actions>
9116                 </permacrud>
9117         </class>
9118
9119         <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">
9120                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
9121                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9122                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9123                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9124                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
9125                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9126                 </fields>
9127                 <links>
9128                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9129                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9130                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9131                 </links>
9132                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9133                         <actions>
9134                                 <create permission="CREATE_PURCHASE_ORDER">
9135                                         <context link="formula" field="owner"/>
9136                 </create>
9137                                 <retrieve permission="CREATE_PURCHASE_ORDER">
9138                                         <context link="formula" field="owner"/>
9139                 </retrieve>
9140                                 <update permission="CREATE_PURCHASE_ORDER">
9141                                         <context link="formula" field="owner"/>
9142                 </update>
9143                                 <delete permission="CREATE_PURCHASE_ORDER">
9144                                         <context link="formula" field="owner"/>
9145                 </delete>
9146                         </actions>
9147                 </permacrud>
9148         </class>
9149
9150         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
9151                 <fields oils_persist:primary="id">
9152                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
9153                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9154                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
9155                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
9156                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
9157                 </fields>
9158                 <links>
9159                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9160                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9161                 </links>
9162         </class>
9163
9164         <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">
9165                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
9166                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9167                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9168                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9169                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9170                 </fields>
9171                 <links>
9172                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9173                 </links>
9174                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9175                         <actions>
9176                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9177                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9178                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9179                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9180                         </actions>
9181                 </permacrud>
9182         </class>
9183
9184         <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">
9185                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
9186                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9187                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9188                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9189                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9190                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
9191                 </fields>
9192                 <links>
9193                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9194                 </links>
9195                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9196                         <actions>
9197                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9198                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9199                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9200                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9201                         </actions>
9202                 </permacrud>
9203         </class>
9204
9205         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
9206                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
9207                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9208                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9209                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9210                 </fields>
9211                 <links>
9212                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9213                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9214                 </links>
9215         </class>
9216
9217         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
9218                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
9219                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9220                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9221                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9222                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9223                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9224                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9225                 </fields>
9226                 <links>
9227                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9228                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
9229                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9230                 </links>
9231         </class>
9232
9233         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
9234                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
9235                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9236                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9237                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
9238                 </fields>
9239                 <links>
9240                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9241                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
9242                 </links>
9243         </class>
9244
9245         <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">
9246                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
9247                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9248                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9249                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9250                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9251                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9252                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9253                 </fields>
9254                 <links>
9255                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9256                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
9257                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9258                 </links>
9259         </class>
9260
9261         <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">
9262                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
9263                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
9264                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9265                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
9266                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9267                 </fields>
9268                 <links>
9269                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9270                 </links>
9271                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9272             <actions>
9273                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9274                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
9275                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9276                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9277             </actions>
9278                 </permacrud>
9279         </class>
9280
9281         <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">
9282                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
9283                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
9284                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
9285                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
9286                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
9287                 </fields>
9288                 <links>
9289                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9290                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
9291                 </links>
9292                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9293                         <actions>
9294                                 <create permission="ADMIN_CLAIM_POLICY">
9295                                         <context link="claim_policy" field="org_unit"/>
9296                 </create>
9297                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
9298                                         <context link="claim_policy" field="org_unit"/>
9299                 </retrieve>
9300                                 <update permission="ADMIN_CLAIM_POLICY">
9301                                         <context link="claim_policy" field="org_unit"/>
9302                 </update>
9303                                 <delete permission="ADMIN_CLAIM_POLICY">
9304                                         <context link="claim_policy" field="org_unit"/>
9305                 </delete>
9306                         </actions>
9307                 </permacrud>
9308         </class>
9309
9310     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
9311         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
9312             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9313             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
9314             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9315             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
9316             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
9317             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
9318             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
9319             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
9320             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
9321             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
9322             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
9323             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
9324             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
9325             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
9326             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9327             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
9328         </fields>
9329         <links>
9330             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
9331         </links>
9332     </class>
9333
9334     <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">
9335         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
9336             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9337             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9338             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9339             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9340             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9341         </fields>
9342     </class>
9343
9344     <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">
9345         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9346             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9347             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9348             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9349             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9350             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9351             <field reporter:label="City" name="city" reporter:datatype="text"/>
9352             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9353             <field reporter:label="State" name="state" reporter:datatype="text"/>
9354             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9355             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9356             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9357         </fields>
9358     </class>
9359
9360     <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">
9361         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9362             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9363             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9364             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9365             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9366             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9367             <field reporter:label="City" name="city" reporter:datatype="text"/>
9368             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9369             <field reporter:label="State" name="state" reporter:datatype="text"/>
9370             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9371             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9372             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9373         </fields>
9374     </class>
9375
9376     <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">
9377         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
9378             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9379             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9380             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9381             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
9382             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
9383             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9384         </fields>
9385     </class>
9386
9387         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
9388                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
9389                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
9390                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9391                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9392                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
9393                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
9394                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
9395                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
9396                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
9397                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
9398                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
9399                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
9400                 </fields>
9401                 <links>
9402                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9403                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9404                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9405                 </links>
9406         </class>
9407
9408         <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">
9409                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
9410                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
9411                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
9412                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
9413                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
9414                 </fields>
9415                 <links>
9416                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
9417                 </links>
9418         </class>
9419
9420     <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">
9421         <fields>
9422             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9423             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9424             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9425         </fields>
9426                 <links>
9427                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9428                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9429                 </links>
9430     </class>
9431
9432     <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">
9433         <fields>
9434             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9435             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
9436         </fields>
9437                 <links>
9438                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9439                 </links>
9440     </class>
9441
9442     <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">
9443         <fields>
9444             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9445             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9446             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9447         </fields>
9448                 <links>
9449                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9450                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9451                 </links>
9452     </class>
9453
9454     <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">
9455         <fields>
9456             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9457             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
9458         </fields>
9459                 <links>
9460                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9461                 </links>
9462     </class>
9463
9464     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
9465                 <oils_persist:source_definition>
9466
9467             SELECT  DISTINCT l.*
9468               FROM  action.unfulfilled_hold_loops l
9469                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
9470               WHERE l.count = m.max
9471
9472                 </oils_persist:source_definition>
9473         <fields>
9474             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9475             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9476             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9477         </fields>
9478                 <links>
9479                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9480                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9481                 </links>
9482     </class>
9483
9484         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
9485                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
9486                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
9487                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
9488                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
9489                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
9490                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
9491                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
9492                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
9493                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
9494                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
9495                 </fields>
9496                 <links>
9497                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
9498                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
9499                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
9500                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
9501                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
9502                 </links>
9503         </class>
9504
9505         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
9506                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
9507                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
9508                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
9509                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9510                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
9511                 </fields>
9512                 <links>
9513                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
9514                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
9515                 </links>
9516         </class>
9517
9518         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
9519                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
9520                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
9521                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
9522                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
9523                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
9524                 </fields>
9525                 <links>
9526                 </links>
9527         </class>
9528
9529         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
9530                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
9531                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
9532                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
9533                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9534                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
9535                 </fields>
9536                 <links>
9537                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
9538                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
9539                 </links>
9540         </class>
9541         
9542         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
9543                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
9544                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
9545                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
9546                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
9547                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
9548                 </fields>
9549                 <links>
9550                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
9551                 </links>
9552         </class>
9553         
9554         <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">
9555                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
9556                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
9557                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9558                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9559                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
9560                 </fields>
9561                 <links>
9562                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9563                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
9564                 </links>
9565         </class>
9566
9567         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
9568                 <fields oils_persist:primary="name">
9569                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
9570                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9571                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
9572                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9573                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
9574                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
9575                 </fields>
9576                 <links>
9577                 </links>
9578         </class>
9579
9580         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
9581                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9582                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9583                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
9584                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9585                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9586                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9587                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9588                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9589                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9590                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9591                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9592                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9593                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9594                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9595                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9596                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9597                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9598                 </fields>
9599                 <links>
9600                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9601                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9602                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9603                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9604                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9605                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9606                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9607                 </links>
9608         </class>
9609
9610         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9611                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9612                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9613                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9614                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9615                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9616                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9617                 </fields>
9618                 <links>
9619                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9620                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9621                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9622                 </links>
9623         </class>
9624
9625         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
9626                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
9627                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
9628                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
9629                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
9630                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
9631                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
9632                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
9633                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9634                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
9635                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9636                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
9637                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
9638                 </fields>
9639                 <links>
9640                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9641                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
9642                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
9643                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
9644                 </links>
9645         </class>
9646
9647         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
9648                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
9649                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
9650                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
9651                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9652                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9653                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
9654                 </fields>
9655                 <links>
9656                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
9657                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
9658                 </links>
9659         </class>
9660
9661         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
9662                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
9663                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
9664                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9665                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9666                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9667                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
9668                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
9669                 </fields>
9670                 <links>
9671                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9672                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9673                 </links>
9674         </class>
9675
9676         <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">
9677                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9678                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9679                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9680                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9681                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9682                 </fields>
9683                 <links>
9684                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9685                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9686                 </links>
9687         </class>
9688
9689         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9690                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9691                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9692                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9693                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9694                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9695                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9696                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9697                 </fields>
9698                 <links>
9699                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9700                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9701                 </links>
9702         </class>
9703
9704         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
9705                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9706                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9707                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9708                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9709                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9710                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9711                 </fields>
9712                 <links>
9713                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9714                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9715                 </links>
9716         </class>
9717
9718         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
9719                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9720                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9721                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9722                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9723                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9724                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9725                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9726                 </fields>
9727                 <links>
9728                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9729                 </links>
9730         </class>
9731
9732         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9733                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9734                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9735                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9736                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9737                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9738                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9739                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9740                 </fields>
9741                 <links>
9742                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9743                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9744                 </links>
9745         </class>
9746
9747         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9748                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9749                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9750                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9751                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9752                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9753                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9754                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9755                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9756                 </fields>
9757                 <links>
9758                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9759                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9760                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9761                 </links>
9762         </class>
9763
9764         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9765                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9766                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9767                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9768                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9769                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9770                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9771                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9772                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9773                 </fields>
9774                 <links>
9775                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9776                 </links>
9777         </class>
9778
9779         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
9780                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9781                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9782                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9783                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9784                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9785                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9786                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9787                 </fields>
9788                 <links>
9789                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9790                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9791                 </links>
9792         </class>
9793
9794         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
9795                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9796                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9797                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9798                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9799                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9800                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9801                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9802                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9803                 </fields>
9804                 <links>
9805                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9806                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9807                 </links>
9808         </class>
9809
9810         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
9811                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9812                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9813                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9814                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9815                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9816                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9817                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9818                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9819                 </fields>
9820                 <links>
9821                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9822                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9823                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9824                 </links>
9825         </class>
9826
9827         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
9828                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9829                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9830                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9831                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9832                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9833                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9834                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9835                 </fields>
9836                 <links>
9837                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9838                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9839                 </links>
9840         </class>
9841
9842         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
9843                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9844                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9845                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9846                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9847                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9848                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9849                 </fields>
9850                 <links>
9851                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9852                 </links>
9853         </class>
9854
9855         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
9856                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9857                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9858                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9859                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9860                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9861                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9862                 </fields>
9863                 <links>
9864                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9865                 </links>
9866         </class>
9867
9868         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
9869                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9870                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9871                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9872                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9873                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9874                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9875                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9876                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9877                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9878                 </fields>
9879                 <links>
9880                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9881                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9882                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9883                 </links>
9884         </class>
9885
9886         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
9887                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9888                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9889                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9890                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9891                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9892                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9893                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9894                 </fields>
9895                 <links>
9896                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9897                 </links>
9898         </class>
9899
9900         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
9901                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9902                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9903                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9904                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9905                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9906                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9907                 </fields>
9908                 <links>
9909                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9910                 </links>
9911         </class>
9912
9913         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
9914                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9915                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9916                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9917                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9918                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9919                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9920                 </fields>
9921                 <links>
9922                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9923                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9924                 </links>
9925         </class>
9926
9927         <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">
9928                 <fields oils_persist:primary="id">
9929                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
9930                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
9931                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
9932                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
9933                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
9934                 </fields>
9935                 <links>
9936                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
9937                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9938                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
9939                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
9940                 </links>
9941         </class>
9942
9943         <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">
9944                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
9945                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9946                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
9947                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9948                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
9949                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9950                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9951                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
9952                 </fields>
9953                 <links/>
9954                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9955                         <actions>
9956                                 <retrieve/>
9957                         </actions>
9958                 </permacrud>
9959         </class>
9960
9961         <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">
9962                 <fields oils_persist:primary="ptype_key">
9963                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
9964                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9965                 </fields>
9966                 <links/>
9967                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9968                         <actions>
9969                                 <retrieve/>
9970                         </actions>
9971                 </permacrud>
9972         </class>
9973
9974         <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">
9975                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
9976                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9977                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
9978                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9979                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9980                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9981                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9982                 </fields>
9983                 <links>
9984                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
9985                 </links>
9986                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9987                         <actions>
9988                                 <retrieve/>
9989                         </actions>
9990                 </permacrud>
9991         </class>
9992
9993         <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">
9994                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
9995                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9996                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
9997                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
9998                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9999                 </fields>
10000                 <links>
10001                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10002                 </links>
10003                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10004                         <actions>
10005                                 <retrieve/>
10006                         </actions>
10007                 </permacrud>
10008         </class>
10009
10010     <class
10011         id="uvs"
10012         controller="open-ils.cstore open-ils.pcrud"
10013         oils_obj:fieldmapper="url_verify::session"
10014         oils_persist:tablename="url_verify.session"
10015         reporter:label="URL Verification Session"
10016     >
10017         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
10018             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
10019             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10020                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
10021             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
10022             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
10023             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10024             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
10025             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
10026             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
10027         </fields>
10028
10029         <links>
10030             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10031             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10032             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
10033             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
10034             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
10035         </links>
10036
10037         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10038             <actions>
10039                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
10040             </actions>
10041         </permacrud>
10042
10043     </class>
10044
10045     <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">
10046         <oils_persist:source_definition>
10047             SELECT
10048                 cbrebi.id AS id,  -- so we can have a pkey in our view
10049                 uvs.id AS session,
10050                 uvs.owning_lib,
10051                 cbrebi.target_biblio_record_entry
10052             FROM url_verify.session uvs
10053             JOIN container.biblio_record_entry_bucket cbreb
10054                 ON (uvs.container = cbreb.id)
10055             JOIN container.biblio_record_entry_bucket_item cbrebi
10056                 ON (cbrebi.bucket = cbreb.id)
10057         </oils_persist:source_definition>
10058         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
10059             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
10060             <field reporter:label="Session" name="session" reporter:datatype="link" />
10061             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
10062             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
10063         </fields>
10064         <links>
10065             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
10066             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
10067             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
10068         </links>
10069         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10070             <actions>
10071                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
10072             </actions>
10073         </permacrud>
10074     </class>
10075
10076     <class
10077         id="uvus"
10078         controller="open-ils.cstore open-ils.pcrud"
10079         oils_obj:fieldmapper="url_verify::url_selector"
10080         oils_persist:tablename="url_verify.url_selector"
10081         reporter:label="URL Verification URL Selector"
10082     >
10083         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
10084             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
10085             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
10086                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10087             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
10088         </fields>
10089
10090         <links>
10091             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10092             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
10093         </links>
10094
10095         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10096             <actions>
10097                 <create permission="URL_VERIFY">
10098                     <context link="session" field="owning_lib"/>
10099                 </create>
10100                 <retrieve permission="URL_VERIFY">
10101                     <context link="session" field="owning_lib"/>
10102                 </retrieve>
10103                 <update permission="URL_VERIFY">
10104                     <context link="session" field="owning_lib"/>
10105                 </update>
10106                 <delete permission="URL_VERIFY">
10107                     <context link="session" field="owning_lib"/>
10108                 </delete>
10109             </actions>
10110         </permacrud>
10111
10112     </class>
10113
10114     <class
10115         id="uvu"
10116         controller="open-ils.cstore open-ils.pcrud"
10117         oils_obj:fieldmapper="url_verify::url"
10118         oils_persist:tablename="url_verify.url"
10119         reporter:label="URL Verification URL"
10120     >
10121         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
10122             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
10123                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
10124                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
10125                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10126                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
10127             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10128             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10129             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
10130             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
10131             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
10132             <field reporter:label="Host" name="host" reporter:datatype="text"/>
10133             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
10134             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
10135             <field reporter:label="Path" name="path" reporter:datatype="text"/>
10136             <field reporter:label="Page" name="page" reporter:datatype="text"/>
10137             <field reporter:label="Query" name="query" reporter:datatype="text"/>
10138             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
10139             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
10140         </fields>
10141
10142         <links>
10143             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
10144             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
10145             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10146             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
10147             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
10148         </links>
10149
10150         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10151             <actions>
10152                 <create permission="URL_VERIFY">
10153                     <context link="session" field="owning_lib"/>
10154                 </create>
10155                 <retrieve permission="URL_VERIFY">
10156                     <context link="session" field="owning_lib"/>
10157                 </retrieve>
10158                 <update permission="URL_VERIFY">
10159                     <context link="session" field="owning_lib"/>
10160                 </update>
10161                 <delete permission="URL_VERIFY">
10162                     <context link="session" field="owning_lib"/>
10163                 </delete>
10164             </actions>
10165         </permacrud>
10166
10167     </class>
10168
10169     <class
10170         id="uvva"
10171         controller="open-ils.cstore open-ils.pcrud"
10172         oils_obj:fieldmapper="url_verify::verification_attempt"
10173         oils_persist:tablename="url_verify.verification_attempt"
10174         reporter:label="URL Verification Attempt"
10175     >
10176         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
10177             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
10178                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
10179                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
10180             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
10181             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
10182         </fields>
10183
10184         <links>
10185             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10186             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10187         </links>
10188
10189         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10190             <actions>
10191                 <create permission="URL_VERIFY">
10192                     <context link="session" field="owning_lib"/>
10193                 </create>
10194                 <retrieve permission="URL_VERIFY">
10195                     <context link="session" field="owning_lib"/>
10196                 </retrieve>
10197                 <update permission="URL_VERIFY">
10198                     <context link="session" field="owning_lib"/>
10199                 </update>
10200                 <delete permission="URL_VERIFY">
10201                     <context link="session" field="owning_lib"/>
10202                 </delete>
10203             </actions>
10204         </permacrud>
10205
10206     </class>
10207
10208     <class
10209         id="uvuv"
10210         controller="open-ils.cstore open-ils.pcrud"
10211         oils_obj:fieldmapper="url_verify::url_verification"
10212         oils_persist:tablename="url_verify.url_verification"
10213         reporter:label="URL Verification"
10214     >
10215         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
10216             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
10217                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
10218                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
10219             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
10220             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
10221             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
10222             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
10223                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
10224         </fields>
10225
10226         <links>
10227             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
10228             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
10229             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
10230         </links>
10231
10232         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10233             <actions>
10234                 <create permission="URL_VERIFY">
10235                     <context link="attempt" jump="session" field="owning_lib"/>
10236                 </create>
10237                 <retrieve permission="URL_VERIFY">
10238                     <context link="attempt" jump="session" field="owning_lib"/>
10239                 </retrieve>
10240                 <update permission="URL_VERIFY">
10241                     <context link="attempt" jump="session" field="owning_lib"/>
10242                 </update>
10243                 <delete permission="URL_VERIFY">
10244                     <context link="attempt" jump="session" field="owning_lib"/>
10245                 </delete>
10246             </actions>
10247         </permacrud>
10248
10249     </class>
10250
10251         <class
10252                 id="cfdi"
10253                 controller="open-ils.cstore open-ils.pcrud"
10254                 oils_obj:fieldmapper="config::filter_dialog_interface"
10255                 oils_persist:tablename="config.filter_dialog_interface"
10256                 reporter:label="FilterDialog Interface">
10257                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
10258                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
10259                         <field reporter:label="Description" name="description" reporter:datatype="text" />
10260                 </fields>
10261                 <links>
10262                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
10263                 </links>
10264                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10265                         <actions>
10266                                 <retrieve />
10267                         </actions>
10268                 </permacrud>
10269         </class>
10270
10271         <class
10272                 id="cfdfs"
10273                 controller="open-ils.cstore open-ils.pcrud"
10274                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
10275                 oils_persist:tablename="config.filter_dialog_filter_set"
10276                 reporter:label="FilterDialog Filter Set">
10277                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
10278                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10279                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10280                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10281                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10282                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
10283                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10284                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
10285                 </fields>
10286                 <links>
10287                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10288                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10289                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
10290                 </links>
10291                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10292                         <actions>
10293                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10294                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10295                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10296                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10297                         </actions>
10298                 </permacrud>
10299
10300         </class>
10301
10302         <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">
10303                 <fields oils_persist:primary="code">
10304                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
10305                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
10306                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
10307                 </fields>
10308                 <links/>
10309                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10310                         <actions>
10311                                 <retrieve/>
10312                         </actions>
10313                 </permacrud>
10314         </class>
10315
10316         <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">
10317                 <oils_persist:source_definition>
10318
10319             SELECT  b.id,
10320                     MAX(dcp.edit_date) AS last_delete_date
10321              FROM   biblio.record_entry b
10322                     JOIN asset.call_number cn ON (cn.record = b.id)
10323                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
10324              WHERE  NOT b.deleted
10325              GROUP BY b.id
10326              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
10327
10328                 </oils_persist:source_definition>
10329                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10330                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10331                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
10332                 </fields>
10333                 <links>
10334                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10335                 </links>
10336                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10337                         <actions>
10338                                 <retrieve/>
10339                         </actions>
10340                 </permacrud>
10341         </class>
10342
10343         <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">
10344                 <oils_persist:source_definition>
10345
10346             -- -- 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.
10347             -- -- 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
10348             -- -- may not.
10349             -- SELECT
10350             --     bre.id AS "bib_id",
10351             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
10352             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
10353             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
10354             -- FROM (
10355                 SELECT
10356                     y.bre AS "id",
10357                     COALESCE( x.copy_count, 0 ) AS "copy_count",
10358                     y.hold_count AS "hold_count",
10359                     (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"
10360                 FROM (
10361                         SELECT
10362                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
10363                             COUNT(*) AS "hold_count"
10364                         FROM action.hold_request h
10365                         WHERE
10366                             cancel_time IS NULL
10367                             AND fulfillment_time IS NULL
10368                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
10369                         GROUP BY 1
10370                     )y LEFT JOIN (
10371                         SELECT 
10372                             (SELECT id
10373                                 FROM biblio.record_entry 
10374                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
10375                             ) AS "bre", 
10376                             COUNT(*) AS "copy_count"
10377                         FROM asset.copy
10378                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
10379                         WHERE copy.holdable 
10380                             AND NOT copy.deleted 
10381                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
10382                         GROUP BY 1
10383                     )x ON x.bre = y.bre
10384                 -- )z RIGHT JOIN (
10385                 --     SELECT id
10386                 --     FROM biblio.record_entry
10387                 --     WHERE NOT deleted
10388                 -- )bre ON (z.bib_id = bre.id)
10389                 
10390
10391                 </oils_persist:source_definition>
10392                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10393                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10394                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
10395                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
10396                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
10397                 </fields>
10398                 <links>
10399                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10400                 </links>
10401                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10402                         <actions>
10403                                 <retrieve/>
10404                         </actions>
10405                 </permacrud>
10406         </class>
10407
10408         <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">
10409                 <oils_persist:source_definition>
10410             SELECT *,
10411                 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,
10412                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10413             FROM
10414                 (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
10415                     FROM
10416                         action.hold_request ahr
10417                         JOIN reporter.hold_request_record rhrr USING (id)
10418                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10419                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10420                     WHERE
10421                         ahr.cancel_time IS NULL
10422                         AND ahr.fulfillment_time IS NULL
10423                     GROUP BY bib_record, pickup_lib
10424                 )x
10425                 JOIN
10426                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10427                     FROM
10428                         action.hold_request ahr
10429                         JOIN reporter.hold_request_record rhrr USING (id)
10430                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10431                     WHERE
10432                         ahr.cancel_time IS NULL
10433                         AND ahr.fulfillment_time IS NULL
10434                     GROUP BY bib_record
10435                 )y
10436                 USING (id)
10437                 </oils_persist:source_definition>
10438                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10439                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10440                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
10441                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
10442                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
10443                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10444                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10445                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
10446                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10447                 </fields>
10448                 <links>
10449                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10450                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
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="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">
10460                 <oils_persist:source_definition>
10461             SELECT
10462                 ac.id,
10463                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
10464                 MAX(actac.xact_start) AS last_circ
10465             FROM asset.copy ac
10466                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10467             GROUP BY ac.id
10468
10469             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
10470             --SELECT
10471             --    ac.id,
10472             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
10473             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
10474             --FROM asset.copy ac
10475             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10476             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
10477             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
10478                 </oils_persist:source_definition>
10479                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10480                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
10481                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
10482                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
10483                 </fields>
10484                 <links>
10485                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10486                 </links>
10487                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10488                         <actions>
10489                                 <retrieve/>
10490                         </actions>
10491                 </permacrud>
10492         </class>
10493
10494         <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">
10495                 <fields oils_persist:primary="id">
10496                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
10497                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
10498                 </fields>
10499                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10500                         <actions>
10501                                 <retrieve/>
10502                         </actions>
10503                 </permacrud>
10504         </class>
10505
10506         <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">
10507                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
10508                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10509                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
10510                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10511                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10512                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10513                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10514                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10515                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
10516                 </fields>
10517                 <links>
10518                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
10519                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10520                 </links>
10521                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10522                         <actions>
10523                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10524                                 <retrieve/>
10525                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10526                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10527                         </actions>
10528                 </permacrud>
10529         </class>
10530
10531         <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">
10532                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
10533                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10534                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
10535                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10536                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10537                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10538                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10539                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10540                 </fields>
10541                 <links>
10542                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
10543                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10544                 </links>
10545                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10546                         <actions>
10547                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10548                                 <retrieve/>
10549                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10550                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10551                         </actions>
10552                 </permacrud>
10553         </class>
10554
10555
10556         <!-- ********************************************************************************************************************* -->
10557         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
10558         <!-- ********************************************************************************************************************* -->
10559         <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">
10560                 <fields oils_persist:primary="id">
10561                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
10562                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
10563                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
10564                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10565                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
10566                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
10567                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10568                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
10569                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
10570                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
10571                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
10572                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
10573                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
10574                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
10575                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10576                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
10577                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
10578                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
10579                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
10580                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
10581                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
10582                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
10583                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
10584                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
10585                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
10586                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
10587                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
10588                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
10589                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
10590                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10591                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10592                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10593                 </fields>
10594                 <links>
10595                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10596                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
10597                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
10598                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
10599                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
10600                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
10601                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
10602                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
10603                 </links>
10604         </class>
10605
10606         <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">
10607                 <fields oils_persist:primary="id">
10608                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10609                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10610                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10611                 </fields>
10612                 <links>
10613                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10614                 </links>
10615         </class>
10616
10617         <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">
10618                 <fields oils_persist:primary="id">
10619                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10620                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10621                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10622                 </fields>
10623                 <links>
10624                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10625                 </links>
10626         </class>
10627
10628         <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">
10629                 <fields oils_persist:primary="id">
10630                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
10631
10632                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
10633                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
10634                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
10635
10636                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
10637                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
10638                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
10639
10640                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
10641                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
10642
10643                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10644                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
10645                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
10646
10647                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
10648                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
10649
10650                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
10651                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
10652                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
10653
10654                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
10655                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
10656                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
10657
10658                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10659                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
10660                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
10661                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
10662
10663                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
10664                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
10665
10666                 </fields>
10667                 <links>
10668                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
10669                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10670                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
10671                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
10672                 </links>
10673         </class>
10674
10675         <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">
10676                 <oils_persist:source_definition>
10677
10678             SELECT
10679                 po.ordering_agency AS ordering_agency,
10680                 po.id AS purchase_order,
10681                 li.id AS lineitem,
10682                 lid.id AS lineitem_detail,
10683                 cpa.id AS claim_policy_action
10684             FROM
10685                 acq.lineitem_detail lid
10686                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
10687                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
10688                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
10689                 JOIN acq.claim_policy_action cpa ON (
10690                     cpa.claim_policy = cp.id
10691
10692                     -- we only care about claim policy actions whose claim
10693                     -- interval we'd reached or exceeded
10694                     AND (NOW() - cpa.action_interval) &gt; po.order_date
10695
10696                     -- filter out all claim policy actions where claim events
10697                     -- have occurred on or after the action's action_interval
10698                     AND NOT EXISTS (
10699                         SELECT 1
10700                         FROM
10701                             acq.claim_event evt
10702                             JOIN acq.claim claim ON (
10703                                 claim.id = evt.claim
10704                                 AND claim.lineitem_detail = lid.id
10705                             )
10706                         WHERE
10707                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
10708                     )
10709                 )
10710             WHERE
10711                 lid.cancel_reason IS NULL
10712                 AND li.cancel_reason IS NULL -- belt/suspenders
10713                 AND po.cancel_reason IS NULL -- belt/suspenders
10714                 AND lid.recv_time IS NULL
10715                 AND po.state = 'on-order'
10716             ORDER BY 1, 2, 3, 4, 5
10717
10718                 </oils_persist:source_definition>
10719                 <fields>
10720                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10721                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10722                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10723                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10724                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
10725                 </fields>
10726                 <links>
10727                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10728                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10729                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10730                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10731                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
10732                 </links>
10733         </class>
10734         <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">
10735                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10736                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10737                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10738                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10739                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10740                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
10741                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10742                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10743                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10744                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10745                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10746                 </fields>
10747                 <links>
10748                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10749                 </links>
10750     </class>
10751         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
10752                 <oils_persist:source_definition>
10753             SELECT * FROM acq.lineitem_summary 
10754                                 WHERE item_count > (invoice_count + cancel_count)
10755         </oils_persist:source_definition>
10756                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10757                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10758                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10759                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10760                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10761                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
10762                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10763                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10764                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10765                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10766                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10767                 </fields>
10768                 <links>
10769                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10770                 </links>
10771     </class>
10772         <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">
10773                 <oils_persist:source_definition>
10774
10775                         SELECT  t.*
10776                           FROM  action.transit_copy t
10777                                 JOIN actor.org_unit AS s ON (t.source = s.id)
10778                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
10779                           WHERE s.parent_ou &lt;&gt; d.parent_ou
10780
10781                 </oils_persist:source_definition>
10782                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
10783                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
10784                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
10785                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
10786                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
10787                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
10788                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
10789                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
10790                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
10791                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
10792                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
10793                 </fields>
10794                 <links>
10795                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
10796                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
10797                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
10798                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
10799                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10800                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
10801                 </links>
10802         </class>
10803
10804     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
10805                 <oils_persist:source_definition>
10806
10807         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
10808                 SELECT
10809                         cp.id as copy,
10810                         COUNT(circ.id),
10811                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10812                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10813                 FROM
10814                         asset.copy cp
10815                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
10816                 GROUP BY 1, 3, 4
10817                 UNION ALL
10818                 SELECT
10819                         cp.id as copy,
10820                         COUNT(circ.id),
10821                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10822                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10823                 FROM
10824                         asset.copy cp
10825                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
10826                 GROUP BY 1, 3, 4
10827                 UNION ALL
10828                 SELECT
10829                         id as copy,
10830                         circ_count,
10831                         -1 AS year,
10832                         false as is_renewal
10833                 FROM
10834                         extend_reporter.legacy_circ_count
10835         )x GROUP BY 1, 3, 4
10836
10837                 </oils_persist:source_definition>
10838         <fields>
10839             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
10840             <field reporter:label="Count" name="count" reporter:datatype="int"/>
10841             <field reporter:label="Year" name="year" reporter:datatype="int"/>
10842             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
10843         </fields>
10844                 <links>
10845                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
10846                 </links>
10847                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10848                         <actions>
10849                                 <retrieve/>
10850                         </actions>
10851                 </permacrud>
10852     </class>
10853
10854         <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">
10855                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
10856                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
10857                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
10858                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
10859                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
10860                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
10861                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
10862                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
10863                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
10864                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
10865                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
10866                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
10867                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
10868                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
10869                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
10870                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
10871                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
10872                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
10873                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
10874                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
10875                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
10876                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
10877                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
10878                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
10879                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
10880                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
10881                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
10882                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
10883                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
10884                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
10885                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
10886                 </fields>
10887                 <links>
10888                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
10889                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
10890                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
10891                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10892                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
10893                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10894                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10895                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
10896                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
10897                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
10898                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
10899                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
10900                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
10901                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
10902                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
10903                 </links>
10904         </class>
10905
10906     <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">
10907         <fields oils_persist:primary="id">
10908             <field reporter:label="Title" name="title" reporter:datatype="text"/>
10909             <field reporter:label="Author" name="author" reporter:datatype="text"/>
10910             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
10911             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
10912             <field reporter:label="Price" name="price" reporter:datatype="money"/>
10913             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10914             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
10915             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
10916             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10917             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
10918             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10919             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
10920             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
10921             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
10922             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10923             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10924             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
10925             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
10926             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
10927             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
10928             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
10929             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
10930             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10931             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
10932             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
10933             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
10934             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
10935             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
10936             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
10937             <field reporter:label="Status" name="status" reporter:datatype="link"/>
10938             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
10939             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
10940             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
10941             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
10942         </fields>
10943         <links>
10944             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10945             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10946             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10947             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10948             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
10949             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
10950             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
10951             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
10952         </links>
10953     </class>
10954
10955     <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">
10956         <fields oils_persist:primary="id">
10957             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10958             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10959             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10960             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10961         </fields>
10962         <links>
10963             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10964             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10965         </links>
10966     </class>
10967
10968     <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">
10969         <fields oils_persist:primary="owning_lib">
10970             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10971             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10972             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10973         </fields>
10974         <links>
10975             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10976         </links>
10977     </class>
10978
10979     <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">
10980         <fields oils_persist:primary="id">
10981             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10982             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10983             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10984             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10985             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10986         </fields>
10987         <links>
10988             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10989             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10990             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10991         </links>
10992     </class>
10993
10994     <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">
10995         <fields oils_persist:primary="circ_lib">
10996             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10997             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10998             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10999             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11000         </fields>
11001         <links>
11002             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11003             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11004         </links>
11005     </class>
11006
11007     <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">
11008         <fields oils_persist:primary="id">
11009             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11010             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11011             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11012             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11013             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11014         </fields>
11015         <links>
11016             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11017             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11018             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11019         </links>
11020     </class>
11021
11022     <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">
11023         <fields oils_persist:primary="home_ou">
11024             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11025             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11026             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11027             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11028         </fields>
11029         <links>
11030             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11031             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11032         </links>
11033     </class>
11034         <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">
11035                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
11036                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
11037                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
11038                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
11039                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
11040                 </fields>
11041                 <links>
11042                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11043                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
11044                 </links>
11045                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11046                         <actions>
11047                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11048                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
11049                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11050                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11051                         </actions>
11052                 </permacrud>
11053         </class>
11054         <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">
11055                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
11056                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
11057                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
11058                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
11059                 </fields>
11060                 <links>
11061                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
11062                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
11063                         </links>
11064                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11065                 <actions>
11066                                 <create permission="ADMIN_ACQ_FUND_TAG">
11067                                         <context link="tag" field="owner"/>
11068                                 </create>
11069                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
11070                                         <context link="tag" field="owner"/>
11071                                 </retrieve>
11072                                 <update permission="ADMIN_ACQ_FUND_TAG">
11073                                         <context link="tag" field="owner"/>
11074                                 </update>
11075                                 <delete permission="ADMIN_ACQ_FUND_TAG">
11076                                         <context link="tag" field="owner"/>
11077                                 </delete>
11078                         </actions>
11079                 </permacrud>
11080         </class>
11081         <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">
11082                 <oils_persist:source_definition><![CDATA[
11083                 SELECT
11084                         poi.purchase_order AS purchase_order,
11085                         ii.invoice AS invoice,
11086                         NULL AS lineitem,
11087                         poi.id AS po_item,
11088                         NULL AS picklist
11089                 FROM
11090                         acq.po_item poi
11091                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
11092                 UNION SELECT
11093                         jub.purchase_order AS purchase_order,
11094                         ie.invoice AS invoice,
11095                         jub.id AS lineitem,
11096                         NULL AS po_item,
11097                         jub.picklist AS picklist
11098                 FROM
11099                         acq.lineitem jub
11100                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
11101                 UNION SELECT
11102                         ii.purchase_order AS purchase_order,
11103                         ii.invoice AS invoice,
11104                         NULL AS lineitem,
11105                         NULL AS po_item,
11106                         NULL AS picklist
11107                 FROM
11108                         acq.invoice_item ii
11109                 WHERE ii.po_item IS NULL
11110                 UNION SELECT
11111                         ie.purchase_order AS purchase_order,
11112                         ie.invoice AS invoice,
11113                         NULL AS lineitem,
11114                         NULL AS po_item,
11115                         NULL AS picklist
11116                 FROM
11117                         acq.invoice_entry ie
11118                 WHERE ie.lineitem IS NULL
11119                 UNION SELECT
11120                         NULL AS purchase_order,
11121                         NULL AS invoice,
11122                         jub.id AS lineitem,
11123                         NULL AS po_item,
11124                         jub.picklist AS picklist
11125                 FROM
11126                         acq.lineitem jub
11127                 WHERE jub.purchase_order IS NULL
11128                 ]]></oils_persist:source_definition>
11129                 <fields>
11130                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
11131                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
11132                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
11133                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
11134                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
11135                 </fields>
11136                 <links>
11137                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
11138                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
11139                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
11140                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
11141                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
11142                 </links>
11143         </class>
11144         <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">
11145                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
11146                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11147                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
11148                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11149                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
11150                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
11151                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11152                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
11153                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
11154                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
11155                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
11156                 </fields>
11157                 <links>
11158                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11159                 </links>
11160                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11161                         <actions>
11162                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11163                                 <retrieve/>
11164                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11165                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11166                         </actions>
11167                 </permacrud>
11168         </class>
11169
11170         <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">
11171                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
11172                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11173                         <field name="date_applied" reporter:datatype="timestamp"/>
11174                         <field name="org" reporter:datatype="org_unit"/>
11175                         <field name="original_value" reporter:datatype="text"/>
11176                         <field name="new_value" reporter:datatype="text"/>
11177                         <field name="field_name" reporter:datatype="link"/>
11178                 </fields>
11179                 <links>
11180                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
11181                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
11182                 </links>
11183                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11184                         <actions>
11185                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
11186                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
11187                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11188                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11189                         </actions>
11190                 </permacrud>
11191         </class>
11192         <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">
11193                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11194                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11195                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11196                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11197                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11198                 </fields>
11199                 <links>
11200                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11201                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
11202                 </links>
11203         </class>
11204         <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">
11205                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11206                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11207                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11208                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11209                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11210                 </fields>
11211                 <links>
11212                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11213                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
11214                 </links>
11215         </class>
11216         <class id="cfg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::floating_group" oils_persist:tablename="config.floating_group" reporter:label="Floating Group">
11217                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
11218                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11219                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11220                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
11221                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
11222                 </fields>
11223                 <links>
11224                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
11225                 </links>
11226                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11227                         <actions>
11228                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11229                                 <retrieve/>
11230                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11231                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11232                         </actions>
11233                 </permacrud>
11234         </class>
11235         <class id="cfgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::floating_group_member" oils_persist:tablename="config.floating_group_member" reporter:label="Floating Group Members">
11236                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
11237                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11238                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
11239                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
11240                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
11241                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
11242                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
11243                 </fields>
11244                 <links>
11245                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
11246                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
11247                 </links>
11248                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11249                         <actions>
11250                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11251                                 <retrieve/>
11252                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11253                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11254                         </actions>
11255                 </permacrud>
11256         </class>
11257
11258         <!-- ********************************************************************************************************************* -->
11259
11260 </IDL>
11261
11262 <!--
11263     vim:noet:ts=4:sw=4:
11264 -->