]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Simplified pull list: More name options
[working/Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 ############################
23           TEMPLATE
24 ############################
25
26     <class
27         id=""
28         controller="open-ils.cstore open-ils.pcrud"
29         oils_obj:fieldmapper=""
30         oils_persist:tablename=""
31         reporter:label=""
32         oils_persist:field_safe=""
33         oils_persist:virtual=""
34         oils_persist:readonly=""
35         reporter:core=""
36     >
37
38         <oils_persist:source_definition><![CDATA[
39             SELECT * FROM foo
40         ]]></oils_persist:source_definition>
41
42         <fields oils_persist:primary="" oils_persist:sequence="">
43             <field reporter:label="ID" name="id" reporter:datatype="id"/>
44                         <field reporter:label="" name="" reporter:datatype="org_unit"/>
45             <field reporter:label="" name="" reporter:datatype="text"/>
46             <field reporter:label="" name="" reporter:datatype="link"/>
47             <field reporter:label="" name="" reporter:datatype="timestamp"/>
48             <field reporter:label="" name="" reporter:datatype="money"/>
49             <field reporter:label="" name="" reporter:datatype="bool"/>
50             <field reporter:label="" name="" reporter:datatype="int" oils_obj:required="true"/>
51             <field reporter:label="" name="" reporter:datatype="int" oils_persist:virtual="true"/>
52         </fields>
53
54         <links>
55             <link field="" reltype="has_a" key="" map="" class=""/>
56         </links>
57
58         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
59             <actions>
60                 <create permission="" gloabl_required="true"/>
61                 <retrieve/>
62                 <update permission="" context_field=""/>
63                 <delete permission="">
64                     <context link="" field=""/>
65                 </delete>
66             </actions>
67         </permacrud>
68
69     </class>
70
71
72 -->
73
74 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
75
76         <!-- Virtual classes -->
77         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
78                 <fields>
79                         <field name="usr" oils_persist:virtual="true" />
80                         <field name="forgive_payment" oils_persist:virtual="true" />
81                         <field name="work_payment" oils_persist:virtual="true" />
82                         <field name="credit_payment" oils_persist:virtual="true" />
83                         <field name="goods_payment" oils_persist:virtual="true" />
84                 </fields>
85                 <links>
86                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
87                 </links>
88         </class>
89
90         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
91                 <fields>
92                         <field name="workstation" oils_persist:virtual="true" />
93                         <field name="cash_payment" oils_persist:virtual="true" />
94                         <field name="check_payment" oils_persist:virtual="true" />
95                         <field name="credit_card_payment" oils_persist:virtual="true" />
96                 </fields>
97                 <links>
98                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
99                 </links>
100         </class>
101
102         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
103                 <fields>
104                         <field name="id" oils_persist:virtual="true" />
105                         <field name="children" oils_persist:virtual="true" />
106                         <field name="owner_doc" oils_persist:virtual="true" />
107                         <field name="intra_doc_id" oils_persist:virtual="true" />
108                         <field name="parent_node" oils_persist:virtual="true" />
109                         <field name="node_type" oils_persist:virtual="true" />
110                         <field name="namespace_uri" oils_persist:virtual="true" />
111                         <field name="name" oils_persist:virtual="true" />
112                         <field name="value" oils_persist:virtual="true" />
113                 </fields>
114         </class>
115
116         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
117                 <fields>
118                         <field name="title" oils_persist:virtual="true" />
119                         <field name="author" oils_persist:virtual="true" />
120                         <field name="doc_id" oils_persist:virtual="true" />
121                         <field name="doc_type" oils_persist:virtual="true" />
122                         <field name="pubdate" oils_persist:virtual="true" />
123                         <field name="isbn" oils_persist:virtual="true" />
124                         <field name="publisher" oils_persist:virtual="true" />
125                         <field name="tcn" oils_persist:virtual="true" />
126                         <field name="subject" oils_persist:virtual="true" />
127                         <field name="types_of_resource" oils_persist:virtual="true" />
128                         <field name="call_numbers" oils_persist:virtual="true" />
129                         <field name="edition" oils_persist:virtual="true" />
130                         <field name="online_loc" oils_persist:virtual="true" />
131                         <field name="synopsis" oils_persist:virtual="true" />
132                         <field name="physical_description" oils_persist:virtual="true" />
133                         <field name="toc" oils_persist:virtual="true" />
134                         <field name="copy_count" oils_persist:virtual="true" />
135                         <field name="series" oils_persist:virtual="true" />
136                         <field name="serials" oils_persist:virtual="true" />
137                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
138                 </fields>
139         </class>
140
141         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
142                 <fields>
143                         <field name="err_msg" oils_persist:virtual="true" />
144                         <field name="type" oils_persist:virtual="true" />
145                 </fields>
146         </class>
147
148         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
149                 <fields>
150                         <field name="err_msg" oils_persist:virtual="true" />
151                         <field name="type" oils_persist:virtual="true" />
152                 </fields>
153         </class>
154
155         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
156                 <fields oils_persist:primary="matchpoint">
157                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
158                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
159                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
160                 </fields>
161                 <links>
162                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
163                 </links>
164         </class>
165
166         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
167         <!-- when the time is right, turn me into a view.  -->
168                 <fields>
169             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
170             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
171             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
172             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
173             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
174             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
175             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
176             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
177             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
178             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
179                 </fields>
180         </class>
181
182         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
183                 <fields>
184                         <field name="public_name" oils_persist:virtual="true" />
185                         <field name="target_url" oils_persist:virtual="true" />
186                         <field name="target_coverage" oils_persist:virtual="true" />
187                         <field name="target_embargo" oils_persist:virtual="true" />
188                 </fields>
189         </class>
190
191         <!-- Actually in the DB -->
192         <class id="vmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::merge_profile" oils_persist:tablename="vandelay.merge_profile" reporter:label="Bib Import Merge Profile">
193                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
194                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
195                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
196                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
197                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
198                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
199                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
200                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
201                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
202                 </fields>
203                 <links>
204                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
205                 </links>
206                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
207                         <actions>
208                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
209                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
210                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
211                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
212                         </actions>
213                 </permacrud>
214         </class>
215
216         <class id="vibtf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_bib_trash_fields" oils_persist:tablename="vandelay.import_bib_trash_fields" reporter:label="Import/Overlay Fields for Removal">
217                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
218                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
219                         <field reporter:label="Group" name="grp" reporter:datatype="link"/>
220                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
221                 </fields>
222                 <links>
223                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
224                 </links>
225                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
226                         <actions>
227                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
228                     <context link="grp" field="owner"/>
229                 </create>
230                                 <retrieve permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD">
231                     <context link="grp" field="owner"/>
232                 </retrieve>
233                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
234                     <context link="grp" field="owner"/>
235                 </update>
236                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
237                     <context link="grp" field="owner"/>
238                 </delete>
239                         </actions>
240                 </permacrud>
241         </class>
242
243         <class  id="vibtg" 
244             controller="open-ils.cstore open-ils.pcrud" 
245             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
246             oils_persist:tablename="vandelay.import_bib_trash_group" 
247             reporter:label="Import/Overlay Field Groups for Removal">
248                 <fields oils_persist:primary="id" 
249                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
250                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
251                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
252                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
253                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
254                 </fields>
255                 <links>
256                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
257                 </links>
258                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
259                         <actions>
260                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
261                                 <retrieve permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
262                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
263                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
264                         </actions>
265                 </permacrud>
266         </class>
267
268
269         <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">
270                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
271                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
272                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
273                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
274                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
275                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
276                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
277                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
278                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
279                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
280                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
281                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
282                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
283                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
284                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
285                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
286                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
287                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
288                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
289                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
290                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
291                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
292                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
293                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
294                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
295                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
296                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
297                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
298                 </fields>
299                 <links>
300                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
301                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
302                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
303                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
304                 </links>
305                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
306                         <actions>
307                                 <create permission="CREATE_IMPORT_ITEM">
308                     <context link="definition" field="owner"/>
309                                 </create>
310                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
311                     <context link="definition" field="owner"/>
312                                 </retrieve>
313                                 <update permission="UPDATE_IMPORT_ITEM">
314                     <context link="definition" field="owner"/>
315                                 </update>
316                                 <delete permission="DELETE_IMPORT_ITEM">
317                     <context link="definition" field="owner"/>
318                                 </delete>
319                         </actions>
320                 </permacrud>
321         </class>
322
323         <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">
324                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
325                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
326                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
327                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
328                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
329                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
330                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
331                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
332                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
333                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
334                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
335                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
336                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
337                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
338                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
339                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
340                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
341                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
342                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
343                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
344                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
345                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
346                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
347                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
348                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
349                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
350                 </fields>
351                 <links>
352                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
353                 </links>
354                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
355                         <actions>
356                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
357                                 <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"/>
358                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
359                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
360                         </actions>
361                 </permacrud>
362         </class>
363
364         <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">
365                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
366                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
367                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
368                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
369                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
370                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
371                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
372                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
373                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
374                 </fields>
375                 <links>
376                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
377                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
378                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
379                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
380                 </links>
381                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
382                         <actions>
383                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
384                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
385                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
386                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
387                         </actions>
388                 </permacrud>
389         </class>
390
391         <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">
392                 <fields oils_persist:primary="code">
393                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
394                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
395                 </fields>
396                 <links>
397                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
398                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
399                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
400                 </links>
401                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
402                         <actions>
403                                 <retrieve/>
404                         </actions>
405                 </permacrud>
406         </class>
407
408         <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">
409                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
410                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
411                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
412                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
413                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
414                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
415                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
416                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
417                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
418                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
419                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
420                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
421                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
422                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
423                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
424                 </fields>
425                 <links>
426                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
427                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
428                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
429                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
430             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
431             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
432             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
433                 </links>
434                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
435                         <actions>
436                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
437                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
438                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
439                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
440                         </actions>
441                 </permacrud>
442         </class>
443
444         <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">
445                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
446                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
447                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
448                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
449                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
450                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
451                 </fields>
452                 <links/>
453                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
454                         <actions>
455                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
456                 <retrieve/>
457                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
458                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
459                         </actions>
460                 </permacrud>
461         </class>
462
463         <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">
464                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
465                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
466                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
467                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
468                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
469                 </fields>
470                 <links>
471                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
472                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
473                 </links>
474                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
475                         <actions>
476                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
477                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
478                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
479                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
480                         </actions>
481                 </permacrud>
482         </class>
483
484         <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">
485                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
486                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
487                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
488                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
489                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
490                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
491                 </fields>
492                 <links>
493                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
494                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
495                 </links>
496                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
497                         <actions>
498                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
499                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
500                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
501                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
502                         </actions>
503                 </permacrud>
504         </class>
505
506         <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">
507                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
508                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
509                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
510                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
511                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
512                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
513                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
514                 </fields>
515                 <links>
516                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
517                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
518                 </links>
519                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
520                         <actions>
521                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
522                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
523                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
524                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
525                         </actions>
526                 </permacrud>
527         </class>
528
529         <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">
530                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
531                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
532                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
533                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
534                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
535                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
536                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
537                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
538                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
539                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
540                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
541                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
542                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
543                 </fields>
544                 <links>
545                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
546                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
547                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
548             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
549             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
550                 </links>
551                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
552                         <actions>
553                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
554                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
555                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
556                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
557                         </actions>
558                 </permacrud>
559         </class>
560
561         <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">
562                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
563                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
564                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
565                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
566                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
567                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
568                 </fields>
569                 <links/>
570                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
571                         <actions>
572                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
573                 <retrieve/>
574                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
575                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
576                         </actions>
577                 </permacrud>
578         </class>
579
580         <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">
581                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
582                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
583                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
584                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
585                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
586                 </fields>
587                 <links>
588                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
589                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
590                 </links>
591                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
592                         <actions>
593                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
594                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
595                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
596                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
597                         </actions>
598                 </permacrud>
599         </class>
600
601         <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">
602                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
603                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
604                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
605                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
606                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
607                 </fields>
608                 <links>
609                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
610                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
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                 </fields>
655                 <links>
656                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
657                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
658                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
659                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
660                 </links>
661                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
662                         <actions>
663                                 <create permission="ADMIN_IMPORT_MATCH_SET">
664                     <context link="match_set" field="owner"/>
665                                 </create>
666                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
667                     <context link="match_set" field="owner"/>
668                                 </retrieve>
669                                 <update permission="ADMIN_IMPORT_MATCH_SET">
670                     <context link="match_set" field="owner"/>
671                                 </update>
672                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
673                     <context link="match_set" field="owner"/>
674                                 </delete>
675                         </actions>
676                 </permacrud>
677         </class>
678
679         <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">
680                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
681                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
682                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
683                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
684                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
685                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
686                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
687                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
688                 </fields>
689                 <links>
690                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
691                 </links>
692                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
693                         <actions>
694                                 <create permission="ADMIN_IMPORT_MATCH_SET">
695                     <context link="match_set" field="owner"/>
696                                 </create>
697                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
698                     <context link="match_set" field="owner"/>
699                                 </retrieve>
700                                 <update permission="ADMIN_IMPORT_MATCH_SET">
701                     <context link="match_set" field="owner"/>
702                                 </update>
703                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
704                     <context link="match_set" field="owner"/>
705                                 </delete>
706                         </actions>
707                 </permacrud>
708         </class>
709
710         <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">
711                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
712                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
713                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
714                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
715                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
716                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
717                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
718                 </fields>
719                 <links>
720                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
721                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
722                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
723                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
724                 </links>
725         </class>
726
727     <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">
728         <fields oils_persist:primary="name">
729             <field reporter:label="Name" name="name" reporter:datatype="text"/>
730             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
731             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
732             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
733         </fields>
734         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
735             <actions>
736                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
737                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
738                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
739                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
740             </actions>
741         </permacrud>
742     </class>
743
744     <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">
745         <fields oils_persist:primary="id">
746             <field reporter:label="ID" name="id" reporter:datatype="id"/>
747             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
748             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
749             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
750             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
751         </fields>
752         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
753             <actions>
754                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
755                 <retrieve/>
756                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
757                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
758             </actions>
759         </permacrud>
760     </class>
761
762         <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">
763                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
764                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
765                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
766                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
767                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
768                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
769                 </fields>
770                 <links>
771                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
772                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
773                 </links>
774         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
775             <actions>
776                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
777                 <retrieve/>
778                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
779                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
780             </actions>
781         </permacrud>
782         </class>
783
784         <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">
785                 <fields oils_persist:primary="name">
786                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
787                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
788                         <field reporter:label="Description" name="description" reporter:datatype="text" />
789                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
790                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
791                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
792                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
793                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
794                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
795                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
796                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
797                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
798                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
799                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
800                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
801                 </fields>
802                 <links>
803                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
804                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
805                 </links>
806         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
807             <actions>
808                 <create permission="ADMIN_SVF" global_required="true"/>
809                 <retrieve/>
810                 <update permission="ADMIN_SVF" global_required="true"/>
811                 <delete permission="ADMIN_SVF" global_required="true"/>
812             </actions>
813         </permacrud>
814         </class>
815
816         <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">
817                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
818                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
819                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
820                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
821             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
822                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
823                 </fields>
824                 <links/>
825         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
826             <actions>
827                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
828                 <retrieve/>
829                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
830                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
831             </actions>
832         </permacrud>
833         </class>
834
835         <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">
836                 <fields oils_persist:primary="id">
837                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
838                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
839                 </fields>
840                 <links>
841                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
842                 </links>
843         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
844             <actions>
845                 <retrieve/>
846             </actions>
847         </permacrud>
848         </class>
849
850         <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">
851                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
852                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
853                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
854                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
855                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
856                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
857                 </fields>
858                 <links>
859                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
860                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
861                 </links>
862         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
863             <actions>
864                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
865                 <retrieve/>
866                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
867                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
868             </actions>
869         </permacrud>
870         </class>
871
872         <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">
873                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
874                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true"/>
875                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
876                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
877                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
878                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
879                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
880                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
881             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
882                 </fields>
883                 <links>
884                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
885                 </links>
886         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
887             <actions>
888                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
889                 <retrieve/>
890                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
891                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
892             </actions>
893         </permacrud>
894         </class>
895
896         <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">
897                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
898                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
899                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
900                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
901                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
902                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
903                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
904                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
905                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
906                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
907                 </fields>
908                 <links>
909                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
910                 </links>
911         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
912             <actions>
913                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
914                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
915                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
916                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
917             </actions>
918         </permacrud>
919         </class>
920
921     <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">
922         <fields oils_persist:primary="name">
923             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
924             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
925             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
926             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
927             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
928             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
929             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
930             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
931             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
932             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
933         </fields>
934         <links>
935             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
936             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
937         </links>
938         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
939             <actions>
940                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
941                 <retrieve/>
942                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
943                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
944             </actions>
945         </permacrud>
946     </class>
947
948     <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">
949         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
950             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
951             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
952             <field reporter:label="Name" name="name" reporter:datatype="text"/>
953             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
954             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
955             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
956             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
957         </fields>
958         <links>
959             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
960         </links>
961         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
962             <actions>
963                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
964                 <retrieve/>
965                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
966                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
967             </actions>
968         </permacrud>
969     </class>
970
971     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
972                         oils_obj:fieldmapper="config::z3950_index_field_map" 
973                         oils_persist:tablename="config.z3950_index_field_map" 
974                         reporter:label="Z39.50 Index Field Map">
975         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
976             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
977             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
978             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
979             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
980             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
981             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
982         </fields>
983         <links>
984             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
985             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
986             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
987         </links>
988         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
989             <actions>
990                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
991                 <retrieve/>
992                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
993                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
994             </actions>
995         </permacrud>
996     </class>
997
998
999         <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">
1000                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1001                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1002                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1003                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1004                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1005                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1006                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1007                 </fields>
1008                 <links>
1009             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1010             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1011                 </links>
1012                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1013                         <actions>
1014                                 <retrieve/>
1015                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1016                         </actions>
1017                 </permacrud>
1018         </class>
1019
1020         <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">
1021                 <fields oils_persist:primary="key">
1022                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
1023                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1024                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1025                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1026                 </fields>
1027                 <links/>
1028                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1029                         <actions>
1030                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1031                                 <retrieve/>
1032                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1033                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1034                         </actions>
1035                 </permacrud>
1036         </class>
1037
1038         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1039                 <fields oils_persist:primary="module">
1040                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1041                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1042                 </fields>
1043                 <links/>
1044         </class>
1045
1046         <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">
1047                 <fields oils_persist:primary="module">
1048                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1049                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1050                 </fields>
1051                 <links/>
1052                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1053                         <actions>
1054                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1055                                 <retrieve/>
1056                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1057                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1058                         </actions>
1059                 </permacrud>
1060         </class>
1061
1062         <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">
1063                 <fields oils_persist:primary="module">
1064                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1065                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1066                 </fields>
1067                 <links/>
1068                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1069                         <actions>
1070                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1071                                 <retrieve/>
1072                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1073                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1074                         </actions>
1075                 </permacrud>
1076         </class>
1077
1078         <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">
1079                 <fields oils_persist:primary="module">
1080                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1081                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1082                 </fields>
1083                 <links/>
1084                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1085                         <actions>
1086                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1087                                 <retrieve/>
1088                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1089                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1090                         </actions>
1091                 </permacrud>
1092         </class>
1093
1094         <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">
1095                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1096                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1097                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1098                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1099                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1100                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1101                 </fields>
1102                 <links>
1103                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1104                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1105                 </links>
1106                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1107                         <actions>
1108                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1109                     <context link="event_def" field="owner"/>
1110                 </create>
1111                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1112                     <context link="event_def" field="owner"/>
1113                 </retrieve>
1114                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1115                     <context link="event_def" field="owner"/>
1116                 </update>
1117                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1118                     <context link="event_def" field="owner"/>
1119                 </delete>
1120                         </actions>
1121                 </permacrud>
1122         </class>
1123
1124         <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">
1125                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1126                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1127                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1128                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1129                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1130                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1131                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1132                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1133                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1134                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1135                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1136                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1137                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1138                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1139                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1140                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1141                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1142                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1143                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1144                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1145                 </fields>
1146                 <links>
1147                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1148                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1149                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1150                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1151                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1152                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1153                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1154                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1155                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1156                 </links>
1157                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1158                         <actions>
1159                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1160                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1161                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1162                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1163                         </actions>
1164                 </permacrud>
1165         </class>
1166
1167         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1168                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1169                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1170                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1171                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1172                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1173                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1174                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1175                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1176                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1177                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1178                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1179                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1180                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1181                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1182                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1183                 </fields>
1184                 <links>
1185                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1186                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1187                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1188                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1189                 </links>
1190         </class>
1191
1192         <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">
1193                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1194                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1195                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1196                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1197                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1198                 </fields>
1199                 <links>
1200                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1201                 </links>
1202                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1203                         <actions>
1204                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1205                     <context link="event_def" field="owner"/>
1206                 </create>
1207                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1208                     <context link="event_def" field="owner"/>
1209                 </retrieve>
1210                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1211                     <context link="event_def" field="owner"/>
1212                 </update>
1213                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1214                     <context link="event_def" field="owner"/>
1215                 </delete>
1216                         </actions>
1217                 </permacrud>
1218         </class>
1219
1220         <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">
1221                 <oils_persist:source_definition><![CDATA[
1222                 SELECT  atevdef.hook,
1223                         atevdef.name,
1224                         atevdef.reactor,
1225                         atev.id,
1226                         atev.event_def,
1227                         atev.add_time,
1228                         atev.run_time,
1229                         atev.start_time,
1230                         atev.update_time,
1231                         atev.complete_time,
1232                         atev.update_process,
1233                         atev.state,
1234                         atev.user_data,
1235                         atev.template_output,
1236                         atev.error_output,
1237                         atev.async_output,
1238                         targ_circ.id AS target_circ,
1239                         targ_ahr.id AS target_hold,
1240                         COALESCE(
1241                                 targ_circ.circ_lib,
1242                                 targ_ahr.pickup_lib
1243                         ) AS perm_lib
1244                 FROM action_trigger.event atev
1245                 JOIN action_trigger.event_definition atevdef ON
1246                         (atevdef.id = atev.event_def)
1247                 JOIN action_trigger.hook ath ON
1248                         (ath.key = atevdef.hook)
1249                 LEFT JOIN action.circulation targ_circ ON
1250                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1251                 LEFT JOIN action.hold_request targ_ahr ON
1252                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1253                 WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
1254                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1255                                 'circ.staff.max_visible_event_age',
1256                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1257                         ) UNION
1258                         SELECT '1000 YEARS'::INTERVAL AS value
1259                 ) ous)
1260                 ]]></oils_persist:source_definition>
1261                 <fields oils_persist:primary="id">
1262                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1263                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1264                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1265                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1266                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1267                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1268                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1269                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1270                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1271                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1272                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1273                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1274                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1275                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1276                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1277                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1278                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1279                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1280                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1281                 </fields>
1282                 <links>
1283                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1284                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1285                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1286                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1287                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1288                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1289                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1290                 </links>
1291                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1292                         <actions>
1293                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1294                         </actions>
1295                 </permacrud>
1296         </class>
1297
1298         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1299                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1300                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1301                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1302                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1303                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1304                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1305                 </fields>
1306                 <links>
1307                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1308                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1309                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1310                 </links>
1311         </class>
1312
1313         <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">
1314                 <fields oils_persist:primary="code">
1315                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1316                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1317                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1318                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1319                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1320                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1321                 </fields>
1322                 <links/>
1323         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1324             <actions>
1325                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1326                 <retrieve/>
1327                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1328                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1329             </actions>
1330         </permacrud>
1331         </class>
1332
1333         <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">
1334                 <fields oils_persist:primary="code">
1335                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1336                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1337                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1338                 </fields>
1339                 <links/>
1340         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1341             <actions>
1342                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1343                 <retrieve/>
1344                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1345                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1346             </actions>
1347         </permacrud>
1348         </class>
1349
1350         <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">
1351                 <fields oils_persist:primary="code">
1352                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1353                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1354                 </fields>
1355                 <links/>
1356         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1357             <actions>
1358                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1359                 <retrieve/>
1360                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1361                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1362             </actions>
1363         </permacrud>
1364         </class>
1365
1366         <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">
1367                 <fields oils_persist:primary="code">
1368                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1369                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1370                 </fields>
1371                 <links/>
1372         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1373             <actions>
1374                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1375                 <retrieve/>
1376                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1377                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1378             </actions>
1379         </permacrud>
1380         </class>
1381
1382         <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">
1383                 <fields oils_persist:primary="code">
1384                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1385                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1386                 </fields>
1387                 <links/>
1388         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1389             <actions>
1390                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1391                 <retrieve/>
1392                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1393                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1394             </actions>
1395         </permacrud>
1396         </class>
1397
1398         <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">
1399                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1400                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1401                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1402                 </fields>
1403                 <links/>
1404         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1405             <actions>
1406                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1407                 <retrieve/>
1408                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1409                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1410             </actions>
1411         </permacrud>
1412         </class>
1413
1414         <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">
1415                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1416                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1417                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1418                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1419                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1420                 </fields>
1421         <links>
1422             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1423             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1424             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1425         </links>
1426         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1427             <actions>
1428                 <create permission="UPDATE_COPY">
1429                     <context link="target_copy" field="circ_lib"/>
1430                 </create>
1431                 <retrieve/>
1432                 <update permission="UPDATE_COPY">
1433                     <context link="target_copy" field="circ_lib"/>
1434                 </update>
1435                 <delete permission="UPDATE_COPY">
1436                     <context link="target_copy" field="circ_lib"/>
1437                 </delete>
1438             </actions>
1439         </permacrud>
1440         </class>
1441
1442         <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">
1443                 <fields oils_persist:primary="code">
1444                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1445                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1446                 </fields>
1447                 <links/>
1448         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1449             <actions>
1450                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1451                 <retrieve/>
1452                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1453                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1454             </actions>
1455         </permacrud>
1456         </class>
1457
1458         <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">
1459                 <fields oils_persist:primary="code">
1460                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1461                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1462                 </fields>
1463                 <links/>
1464         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1465             <actions>
1466                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1467                 <retrieve/>
1468                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1469                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1470             </actions>
1471         </permacrud>
1472         </class>
1473
1474         <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">
1475                 <fields oils_persist:primary="code">
1476                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1477                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1478                 </fields>
1479                 <links/>
1480         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1481             <actions>
1482                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1483                 <retrieve/>
1484                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1485                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1486             </actions>
1487         </permacrud>
1488         </class>
1489
1490     <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">
1491         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1492             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1493             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1494             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1495             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1496             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1497             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1498             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1499             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1500             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1501             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1502             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1503             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1504             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1505             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1506             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1507             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1508             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1509         </fields>
1510         <links/>
1511         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1512             <actions>
1513                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1514                 <retrieve/>
1515                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1516                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1517             </actions>
1518         </permacrud>
1519     </class>
1520
1521     <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">
1522         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1523             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1524             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1525             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1526             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1527             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1528             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1529             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1530             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1531             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1532             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1533             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1534             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1535             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1536             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1537             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1538             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1539             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1540             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1541             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1542         </fields>
1543         <links/>
1544         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1545             <actions>
1546                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1547                 <retrieve/>
1548                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1549                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1550             </actions>
1551         </permacrud>
1552     </class>
1553
1554     <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">
1555         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1556             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1557             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1558             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1559             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1560             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1561         </fields>
1562         <links>
1563             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1564             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1565             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1566         </links>
1567         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1568             <actions>
1569                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1570                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1571                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1572                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1573             </actions>
1574         </permacrud>
1575     </class>
1576
1577         <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">
1578                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1579                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1580                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1581                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1582                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1583                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1584                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1585                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1586                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1587                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1588                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1589                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1590                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1591                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1592                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1593                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1594                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1595             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1596                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1597                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1598                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1599                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1600                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1601                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1602                 </fields>
1603                 <links>
1604                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1605                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1606                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1607                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1608                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1609                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1610                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1611                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1612                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1613                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1614                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1615                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1616                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1617             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1618                 </links>
1619         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1620             <actions>
1621                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1622                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1623                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1624                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1625             </actions>
1626         </permacrud>
1627         </class>
1628
1629         <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">
1630                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1631                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1632                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1633                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1634                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1635                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1636                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1637                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1638                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1639                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1640                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1641                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1642                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1643                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1644                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1645                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1646             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1647                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1648                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1649             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1650                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1651                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1652                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1653                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1654             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1655             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1656             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1657                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1658                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1659                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1660                 </fields>
1661                 <links>
1662                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1663                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1664                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1665                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1666                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1667                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1668                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1669                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1670                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1671                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1672                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1673                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1674                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1675                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1676             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1677                 </links>
1678         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1679             <actions>
1680                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1681                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1682                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1683                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1684             </actions>
1685         </permacrud>
1686         </class>
1687
1688     <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">
1689         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1690             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1691             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1692             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1693         </fields>
1694         <links/>
1695         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1696             <actions>
1697                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1698                 <retrieve/>
1699                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1700                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1701             </actions>
1702         </permacrud>
1703     </class>
1704
1705     <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">
1706         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1707             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1708             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1709             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1710             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1711             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1712             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1713             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1714         </fields>
1715         <links>
1716             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1717         </links>
1718         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1719             <actions>
1720                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1721                 <retrieve/>
1722                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1723                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1724             </actions>
1725         </permacrud>
1726     </class>
1727
1728     <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">
1729         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
1730             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1731             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
1732             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1733             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
1734             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1735         </fields>
1736         <links>
1737             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1738             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1739         </links>
1740         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1741             <actions>
1742                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1743                     <context link="matchpoint" field="org_unit"/>
1744                 </create>
1745                 <retrieve/>
1746                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1747                     <context link="matchpoint" field="org_unit"/>
1748                 </update>
1749                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1750                     <context link="matchpoint" field="org_unit"/>
1751                 </delete>
1752             </actions>
1753         </permacrud>
1754     </class>
1755
1756     <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">
1757         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
1758             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1759             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1760             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1761         </fields>
1762         <links>
1763             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1764             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1765         </links>
1766         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1767             <actions>
1768                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1769                     <context link="limit_set" field="owning_lib"/>
1770                 </create>
1771                 <retrieve/>
1772                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1773                     <context link="limit_set" field="owning_lib"/>
1774                 </update>
1775                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1776                     <context link="limit_set" field="owning_lib"/>
1777                 </delete>
1778             </actions>
1779         </permacrud>
1780     </class>
1781     <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">
1782         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
1783             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1784             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1785             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
1786         </fields>
1787         <links>
1788             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1789             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
1790         </links>
1791         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1792             <actions>
1793                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1794                     <context link="limit_set" field="owning_lib"/>
1795                 </create>
1796                 <retrieve/>
1797                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1798                     <context link="limit_set" field="owning_lib"/>
1799                 </update>
1800                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1801                     <context link="limit_set" field="owning_lib"/>
1802                 </delete>
1803             </actions>
1804         </permacrud>
1805     </class>
1806
1807     <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">
1808         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
1809             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1810             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1811             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
1812             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
1813         </fields>
1814         <links>
1815             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1816             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
1817         </links>
1818         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1819             <actions>
1820                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1821                     <context link="limit_set" field="owning_lib"/>
1822                 </create>
1823                 <retrieve/>
1824                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1825                     <context link="limit_set" field="owning_lib"/>
1826                 </update>
1827                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1828                     <context link="limit_set" field="owning_lib"/>
1829                 </delete>
1830             </actions>
1831         </permacrud>
1832     </class>
1833
1834         <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">
1835                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1836                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1837                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1838                 </fields>
1839                 <links/>
1840         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1841             <actions>
1842                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1843                 <retrieve/>
1844                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1845                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1846             </actions>
1847         </permacrud>
1848         </class>
1849
1850         <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">
1851                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1852                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1853                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1854                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1855                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1856                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1857                 </fields>
1858                 <links>
1859                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1860                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1861                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1862                 </links>
1863         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1864             <actions>
1865                 <create permission="ADMIN_SURVEY">
1866                     <context link="survey" field="owner"/>
1867                 </create>
1868                 <retrieve/>
1869                 <update permission="ADMIN_SURVEY">
1870                     <context link="survey" field="owner"/>
1871                 </update>
1872                 <delete permission="ADMIN_SURVEY">
1873                     <context link="survey" field="owner"/>
1874                 </delete>
1875             </actions>
1876         </permacrud>
1877         </class>
1878         <class id="mbts" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction_summary" oils_persist:tablename="money.materialized_billable_xact_summary" reporter:label="Billable Transaction Summary" oils_persist:readonly="true">
1879                 <fields oils_persist:primary="id" oils_persist:sequence="">
1880                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1881                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1882                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1883                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1884                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1885                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1886                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1887                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1888                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1889                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1890                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1891                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1892                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1893                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1894                 </fields>
1895                 <links>
1896                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1897                 </links>
1898         </class>
1899         <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">
1900                 <fields oils_persist:primary="id" oils_persist:sequence="">
1901                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1902                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1903                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1904                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1905                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1906                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1907                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1908                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1909                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1910                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1911                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1912                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1913                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1914                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1915                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1916                 </fields>
1917                 <links>
1918                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1919                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1920                 </links>
1921         </class>
1922         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1923                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1924                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1925                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1926                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1927                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1928                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1929                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1930                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1931                 </fields>
1932                 <links>
1933                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1934                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1935                 </links>
1936         </class>
1937         <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">
1938                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1939                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1940                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1941                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1942                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1943                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1944                 </fields>
1945                 <links>
1946                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1947                 </links>
1948         </class>
1949         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1950                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1951                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1952                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1953                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1954                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1955                 </fields>
1956                 <links>
1957                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1958                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1959                 </links>
1960         </class>
1961         <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">
1962                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1963                         <field name="field" reporter:datatype="link"/>
1964                         <field name="id" reporter:datatype="id" />
1965                         <field name="source" reporter:datatype="link"/>
1966                         <field name="value" reporter:datatype="text"/>
1967                 </fields>
1968                 <links>
1969                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1970                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1971                 </links>
1972         </class>
1973         <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">
1974                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1975                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1976                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1977                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1978                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1979                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1980                 </fields>
1981                 <links>
1982                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1983                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1984                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1985                 </links>
1986         </class>
1987         <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">
1988                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1989                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1990                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1991                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1992                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1993                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1994                 </fields>
1995                 <links>
1996                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1997                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1998                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1999                 </links>
2000         </class>
2001         <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">
2002                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2003                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2004                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2005                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2006                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2007                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2008                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2009                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2010                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2011                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2012                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2013                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2014                 </fields>
2015                 <links>
2016                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2017                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2018                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2019                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2020                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2021                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2022                 </links>
2023         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2024             <actions>
2025                 <create permission="TRANSIT_COPY" context_field="owner">
2026                     <context link="target_copy" field="circ_lib"/>
2027                 </create>
2028                 <retrieve/>
2029                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2030                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2031             </actions>
2032         </permacrud>
2033         </class>
2034         <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">
2035                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2036                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2037                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2038                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2039                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2040                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2041                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2042                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2043                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2044                 </fields>
2045                 <links>
2046                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2047                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2048                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2049                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2050                 </links>
2051         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2052             <actions>
2053                 <create permission="ADMIN_SURVEY">
2054                     <context link="survey" field="owner"/>
2055                 </create>
2056                 <retrieve/>
2057                 <update permission="ADMIN_SURVEY">
2058                     <context link="survey" field="owner"/>
2059                 </update>
2060                 <delete permission="ADMIN_SURVEY">
2061                     <context link="survey" field="owner"/>
2062                 </delete>
2063             </actions>
2064         </permacrud>
2065         </class>
2066         <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">
2067                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2068                         <field name="bucket" />
2069                         <field name="id" reporter:datatype="id" />
2070                         <field name="target_copy" reporter:datatype="link"/>
2071                         <field name="create_time" reporter:datatype="timestamp" />
2072                         <field name="pos" reporter:datatype="int" />
2073                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2074                 </fields>
2075                 <links>
2076                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2077                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2078             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2079                 </links>
2080         </class>
2081         <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">
2082                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2083                         <field name="id" reporter:datatype="id" />
2084                         <field name="item" reporter:datatype="link"/>
2085                         <field name="note" reporter:datatype="text" />
2086                 </fields>
2087                 <links>
2088                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2089                 </links>
2090         </class>
2091
2092         <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">
2093                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2094                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2095                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2096                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2097                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2098                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2099                 </fields>
2100                 <links>
2101                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2102                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2103                 </links>
2104                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2105                         <actions>
2106                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2107                                 <retrieve/>
2108                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2109                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2110                         </actions>
2111                 </permacrud>
2112         </class>
2113
2114         <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">
2115                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2116                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2117                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2118                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2119                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2120                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2121                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2122                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2123                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2124                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2125                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2126                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2127                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2128                 </fields>
2129                 <links>
2130                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2131                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2132                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2133                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2134                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2135                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2136                 </links>
2137                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2138                         <actions>
2139                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2140                                 <retrieve/>
2141                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2142                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2143                         </actions>
2144                 </permacrud>
2145         </class>
2146
2147         <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">
2148                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2149                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2150                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2151                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2152                 </fields>
2153                 <links>
2154                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2155                 </links>
2156                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2157                         <actions>
2158                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2159                                 <retrieve/>
2160                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2161                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2162                         </actions>
2163                 </permacrud>
2164         </class>
2165
2166         <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">
2167                 <fields oils_persist:primary="code">
2168                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2169                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2170                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2171                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2172                 </fields>
2173                 <links>
2174                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2175                 </links>
2176                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2177                         <actions>
2178                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2179                                 <retrieve/>
2180                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2181                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2182                         </actions>
2183                 </permacrud>
2184         </class>
2185
2186         <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">
2187                 <fields oils_persist:primary="code">
2188                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2189                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2190                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2191                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2192                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2193                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2194                 </fields>
2195                 <links>
2196                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2197                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2198                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2199                 </links>
2200                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2201                         <actions>
2202                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2203                                 <retrieve/>
2204                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2205                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2206                         </actions>
2207                 </permacrud>
2208         </class>
2209
2210     <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">
2211         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2212             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2213             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2214             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2215         </fields>
2216         <links>
2217             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2218             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2219         </links>
2220         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2221             <actions>
2222                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2223                 <retrieve/>
2224                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2225                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2226             </actions>
2227         </permacrud>
2228     </class>
2229
2230         <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">
2231                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2232                         <field name="active" reporter:datatype="bool"/>
2233                         <field name="create_date" reporter:datatype="timestamp"/>
2234                         <field name="creator" />
2235                         <field name="deleted" reporter:datatype="bool"/>
2236                         <field name="edit_date" reporter:datatype="timestamp"/>
2237                         <field name="editor" />
2238                         <field name="id" reporter:datatype="id" />
2239                         <field name="last_xact_id" />
2240                         <field name="marc" />
2241                         <field name="source" />
2242                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2243                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2244                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2245                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2246                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2247                 </fields>
2248                 <links>
2249                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2250                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2251                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2252                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2253                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2254                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2255                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2256                 </links>
2257                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2258                         <actions>
2259                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2260                                 <retrieve/>
2261                                 <update permission="UPDATE_MARC" global_required="true"/>
2262                                 <delete permission="UPDATE_MARC" global_required="true"/>
2263                         </actions>
2264                 </permacrud>
2265         </class>
2266         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2267                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2268                         <field name="char_encoding" />
2269                         <field name="id" />
2270                         <field name="record" />
2271                         <field name="record_status" />
2272                         <field name="thesaurus" />
2273                 </fields>
2274                 <links>
2275                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2276                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2277                 </links>
2278         </class>
2279         <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">
2280                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2281                         <field name="id" reporter:datatype="id" />
2282                         <field name="bib" reporter:datatype="link" />
2283                         <field name="authority" reporter:datatype="link" />
2284                 </fields>
2285                 <links>
2286                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2287                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2288                 </links>
2289         </class>
2290         <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">
2291                 <fields oils_persist:primary="code" oils_persist:sequence="">
2292                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2293                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2294                 </fields>
2295                 <links/>
2296         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2297             <actions>
2298                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2299                 <retrieve/>
2300                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2301                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2302             </actions>
2303         </permacrud>
2304         </class>
2305         <class id="mccp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_card_payment" oils_persist:tablename="money.credit_card_payment" reporter:label="Credit Card Payment">
2306                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2307                         <field name="accepting_usr" />
2308                         <field name="amount" reporter:datatype="money" />
2309                         <field name="amount_collected" reporter:datatype="money" />
2310                         <field name="approval_code" reporter:datatype="text"/>
2311                         <field name="cash_drawer" reporter:datatype="link"/>
2312                         <field name="cc_first_name" reporter:datatype="text"/>
2313                         <field name="cc_last_name" reporter:datatype="text"/>
2314                         <field name="cc_number" reporter:datatype="text"/>
2315                         <field name="cc_order_number" reporter:datatype="text"/>
2316                         <field name="cc_type" reporter:datatype="text"/>
2317                         <field name="cc_processor" reporter:datatype="text"/>
2318                         <field name="expire_month" reporter:datatype="int" />
2319                         <field name="expire_year" reporter:datatype="int" />
2320                         <field name="id" reporter:datatype="id" />
2321                         <field name="note" reporter:datatype="text"/>
2322                         <field name="payment_ts" reporter:datatype="timestamp"/>
2323                         <field name="xact" reporter:datatype="link"/>
2324                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2325                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2326                 </fields>
2327                 <links>
2328                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2329                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2330                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2331                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2332                 </links>
2333         </class>
2334         <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">
2335                 <fields oils_persist:primary="name">
2336                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2337                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2338                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2339                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2340                 </fields>
2341                 <links/>
2342         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2343             <actions>
2344                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2345                 <retrieve/>
2346                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2347                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2348             </actions>
2349         </permacrud>
2350         </class>
2351
2352         <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">
2353                 <fields oils_persist:primary="alias">
2354                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2355                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2356                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2357                 </fields>
2358                 <links>
2359                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2360                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2361                 </links>
2362         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2363             <actions>
2364                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2365                 <retrieve/>
2366                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2367                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2368             </actions>
2369         </permacrud>
2370         </class>
2371
2372         <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">
2373                 <fields oils_persist:primary="name">
2374                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2375                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2376                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2377                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2378                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2379                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2380                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2381                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2382                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2383                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2384                 </fields>
2385                 <links>
2386                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2387                 </links>
2388         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2389             <actions>
2390                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2391                 <retrieve/>
2392                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2393                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2394             </actions>
2395         </permacrud>
2396         </class>
2397
2398         <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">
2399                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2400                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2401                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2402                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2403                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2404                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2405                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2406                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2407                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2408                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2409                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2410                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2411                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2412                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2413                 </fields>
2414                 <links>
2415                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2416                 </links>
2417         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2418             <actions>
2419                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2420                 <retrieve/>
2421                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2422                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2423             </actions>
2424         </permacrud>
2425         </class>
2426         <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">
2427                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2428                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2429                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2430                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2431                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2432                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2433                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2434                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2435                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2436                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2437                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2438                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2439                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2440                 </fields>
2441                 <links>
2442                 </links>
2443                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2444                         <actions>
2445                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2446                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2447                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2448                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2449                         </actions>
2450                 </permacrud>
2451         </class>
2452         <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">
2453                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2454                         <field name="id" reporter:datatype="id" />
2455                         <field name="name" reporter:datatype="text"/>
2456                         <field name="xpath" reporter:datatype="text"/>
2457                         <field name="format" reporter:datatype="link"/>
2458                         <field name="first_word" reporter:datatype="bool" />
2459                 </fields>
2460                 <links/>
2461         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2462             <actions>
2463                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2464                 <retrieve/>
2465                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2466                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2467             </actions>
2468         </permacrud>
2469         </class>
2470         <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">
2471                 <fields oils_persist:primary="code" oils_persist:sequence="">
2472                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2473                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2474                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2475                 </fields>
2476                 <links/>
2477         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2478             <actions>
2479                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2480                 <retrieve/>
2481                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2482                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2483             </actions>
2484         </permacrud>
2485         </class>
2486         <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">
2487                 <fields oils_persist:primary="code" oils_persist:sequence="">
2488                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2489                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2490                 </fields>
2491                 <links/>
2492         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2493             <actions>
2494                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2495                 <retrieve/>
2496                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2497                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2498             </actions>
2499         </permacrud>
2500         </class>
2501     <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">
2502         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2503             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2504             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2505             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2506             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2507         </fields>
2508         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2509             <actions>
2510                 <retrieve/>
2511             </actions>
2512         </permacrud>
2513     </class>
2514         <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">
2515                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2516                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2517                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2518                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2519                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2520                 </fields>
2521                 <links>
2522                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2523                 </links>
2524         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2525             <actions>
2526                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2527                 <retrieve/>
2528                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2529                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2530             </actions>
2531         </permacrud>
2532         </class>
2533         <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">
2534                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2535                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2536                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2537                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2538                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2539                 </fields>
2540                 <links>
2541                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2542                 </links>
2543         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2544             <actions>
2545                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2546                 <retrieve/>
2547                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2548                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2549             </actions>
2550         </permacrud>
2551         </class>
2552         <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">
2553                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2554                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2555                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2556                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2557                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2558                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2559                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2560                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2561                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2562                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2563                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2564                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2565                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2566                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2567                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2568                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2569                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2570                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2571                 </fields>
2572                 <links>
2573                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2574                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2575                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2576                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2577                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2578                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2579                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2580                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2581                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2582                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2583                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2584                 </links>
2585         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2586             <actions>
2587                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2588                 <retrieve/>
2589                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2590                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2591             </actions>
2592         </permacrud>
2593         </class>
2594         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2595                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2596                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2597                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2598                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2599                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2600                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2601                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2602                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2603                 </fields>
2604                 <links>
2605                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2606                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2607         </links>
2608         </class>
2609         <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">
2610                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2611                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2612                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2613                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2614                 </fields>
2615                 <links>
2616                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2617                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2618                 </links>
2619         </class>
2620         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2621                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2622                         <field name="id" reporter:datatype="id" />
2623                         <field name="value" oils_persist:i18n="true" />
2624                 </fields>
2625                 <links/>
2626         </class>
2627         <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">
2628                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2629                         <field name="balance_owed" reporter:datatype="money" />
2630                         <field name="total_owed" reporter:datatype="money" />
2631                         <field name="total_paid" reporter:datatype="money" />
2632                         <field name="usr" reporter:datatype="link"/>
2633                 </fields>
2634                 <links>
2635                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2636         </links>
2637         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2638             <actions>
2639                 <retrieve permission="VIEW_USER">
2640                     <context link="usr" field="home_ou"/>
2641                 </retrieve>
2642             </actions>
2643         </permacrud>
2644         </class>
2645         <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">
2646                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2647                         <field name="collector" />
2648                         <field name="enter_time" reporter:datatype="timestamp"/>
2649                         <field name="id" reporter:datatype="id" />
2650                         <field name="location" reporter:datatype="link"/>
2651                         <field name="usr" reporter:datatype="link"/>
2652                 </fields>
2653                 <links>
2654                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2655                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2656                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2657                 </links>
2658         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2659             <actions>
2660                 <create permission="money.collections_tracker.create" context_field="location"/>
2661                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2662                 <delete permission="money.collections_tracker.create" context_field="location"/>
2663             </actions>
2664         </permacrud>
2665         </class>
2666         <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">
2667                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2668                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2669                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2670                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2671                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2672                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2673                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2674                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2675                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2676                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2677                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2678                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2679                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2680                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2681                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2682                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2683                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2684                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2685                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2686                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2687                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2688                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2689                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2690                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2691                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2692                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2693                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2694                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2695                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2696                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2697                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2698                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2699                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2700                 </fields>
2701                 <links>
2702                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2703                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2704                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2705                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2706                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2707                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2708                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2709                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2710                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2711                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2712                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2713                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2714                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2715                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2716                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2717                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2718                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2719                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2720                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2721                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
2722                 </links>
2723         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2724             <actions>
2725                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2726                 <retrieve/>
2727                 <update permission="UPDATE_MARC" global_required="true"/>
2728             </actions>
2729         </permacrud>
2730         </class>
2731         <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">
2732                 <fields oils_persist:primary="id">
2733                         <field name="dow_0_close" />
2734                         <field name="dow_0_open" />
2735                         <field name="dow_1_close" />
2736                         <field name="dow_1_open" />
2737                         <field name="dow_2_close" />
2738                         <field name="dow_2_open" />
2739                         <field name="dow_3_close" />
2740                         <field name="dow_3_open" />
2741                         <field name="dow_4_close" />
2742                         <field name="dow_4_open" />
2743                         <field name="dow_5_close" />
2744                         <field name="dow_5_open" />
2745                         <field name="dow_6_close" />
2746                         <field name="dow_6_open" />
2747                         <field name="id" reporter:datatype="id" />
2748                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2749                 </fields>
2750                 <links>
2751                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2752                 </links>
2753         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2754             <actions>
2755                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2756                 <retrieve/>
2757                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2758                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2759             </actions>
2760         </permacrud>
2761         </class>
2762         <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">
2763                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2764                         <field name="id" reporter:datatype="id" />
2765                         <field name="record" reporter:datatype="link"/>
2766                         <field name="label" reporter:datatype="text"/>
2767                         <field name="label_sortkey" reporter:datatype="text"/>
2768                 </fields>
2769                 <links>
2770                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2771                 </links>
2772         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2773             <actions>
2774                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2775                 <retrieve/>
2776                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2777                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2778             </actions>
2779         </permacrud>
2780         </class>
2781         <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">
2782                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2783                         <field name="id" reporter:datatype="id" />
2784                         <field name="target_copy" reporter:datatype="link" />
2785                         <field name="part" reporter:datatype="link"/>
2786                 </fields>
2787                 <links>
2788                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2789                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2790                 </links>
2791         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2792             <actions>
2793                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2794                 <retrieve/>
2795                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2796                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2797             </actions>
2798         </permacrud>
2799         </class>
2800         <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">
2801                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2802                         <field name="close_end" reporter:datatype="timestamp" />
2803                         <field name="close_start" reporter:datatype="timestamp" />
2804                         <field name="id" reporter:datatype="id" />
2805                         <field name="org_unit" reporter:datatype="org_unit"/>
2806                         <field name="reason" reporter:datatype="text"/>
2807                 </fields>
2808                 <links>
2809                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2810                 </links>
2811         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2812             <actions>
2813                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2814                 <retrieve/>
2815                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2816                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2817             </actions>
2818         </permacrud>
2819         </class>
2820         <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">
2821                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2822                         <field name="extended" reporter:datatype="interval"/>
2823                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2824                         <field name="max_renewals" reporter:datatype="int" />
2825                         <field name="name" reporter:datatype="text"/>
2826                         <field name="normal" reporter:datatype="interval"/>
2827                         <field name="shrt" reporter:datatype="interval"/>
2828                 </fields>
2829                 <links>
2830                 </links>
2831         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2832             <actions>
2833                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2834                 <retrieve/>
2835                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2836                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2837             </actions>
2838         </permacrud>
2839         </class>
2840
2841         <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">
2842                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2843                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2844                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2845             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2846                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2847             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2848                 </fields>
2849                 <links>
2850             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2851                 </links>
2852                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2853             <actions>
2854                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2855                 <retrieve/>
2856                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2857                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2858             </actions>
2859                 </permacrud>
2860         </class>
2861
2862         <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">
2863                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2864                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2865                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2866                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2867             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2868                 </fields>
2869                 <links>
2870                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2871                 </links>
2872                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2873             <actions>
2874                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2875                 <retrieve/>
2876                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2877                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2878             </actions>
2879                 </permacrud>
2880         </class>
2881
2882         <class id="mobts" controller="open-ils.cstore" oils_obj:fieldmapper="money::open_billable_transaction_summary" oils_persist:tablename="money.open_billable_xact_summary" reporter:label="Open Billable Transaction Summary">
2883                 <fields oils_persist:primary="id" oils_persist:sequence="">
2884                         <field name="balance_owed" reporter:datatype="money"/>
2885                         <field name="id" reporter:datatype="id" />
2886                         <field name="last_billing_note" reporter:datatype="text"/>
2887                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2888                         <field name="last_billing_type" reporter:datatype="text"/>
2889                         <field name="last_payment_note" reporter:datatype="text"/>
2890                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2891                         <field name="last_payment_type" reporter:datatype="text"/>
2892                         <field name="total_owed" reporter:datatype="money"/>
2893                         <field name="total_paid" reporter:datatype="money"/>
2894                         <field name="usr" reporter:datatype="link"/>
2895                         <field name="xact_finish" reporter:datatype="timestamp" />
2896                         <field name="xact_start" reporter:datatype="timestamp" />
2897                         <field name="xact_type" reporter:datatype="text"/>
2898                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
2899                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2900                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2901                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
2902                         <field name="billing_location" reporter:datatype="link"/>
2903                 </fields>
2904                 <links>
2905                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2906                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2907                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2908                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2909                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
2910                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2911                 </links>
2912         </class>
2913         <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">
2914                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2915                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2916                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2917                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2918                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2919                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2920                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2921                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2922                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2923                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2924                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2925                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2926                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2927                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2928                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2929                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2930                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2931                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2932                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2933                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2934                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2935                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2936                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2937                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2938                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2939                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2940                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2941                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2942                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2943                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2944                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2945                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2946                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2947                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2948                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2949                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2950                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2951                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2952                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2953                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
2954                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2955                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
2956                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2957                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2958                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2959                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
2960                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2961                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2962                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2963                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2964                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2965                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
2966                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2967                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2968                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2969                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2970                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2971                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2972                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2973                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2974                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2975                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2976                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2977                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
2978                 </fields>
2979                 <links>
2980                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2981                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2982                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2983                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2984                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2985                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2986                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2987                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2988                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2989                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2990                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2991                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2992                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2993                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2994                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2995                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2996                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2997                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2998                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2999                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3000                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3001                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3002                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3003                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3004                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3005                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3006                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3007                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3008                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3009                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3010                 </links>
3011                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3012                         <actions>
3013                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3014                         </actions>
3015                 </permacrud>
3016         </class>
3017         <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">
3018                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3019                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3020                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3021                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3022                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3023                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3024                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3025                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3026                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3027         </fields>
3028                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3029                         <actions>
3030                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3031                                 <retrieve/>
3032                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3033                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3034                         </actions>
3035                 </permacrud>
3036         </class>
3037         <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">
3038                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3039                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3040                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3041                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3042                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3043         </fields>
3044         <links>
3045                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3046                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3047                 </links>
3048                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3049                         <actions>
3050                                 <retrieve permission="RUN_REPORTS">
3051                                         <context link="usr" field="home_ou" />
3052                                 </retrieve>
3053                         </actions>
3054                 </permacrud>
3055         </class>
3056         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3057                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3058                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3059                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3060                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3061                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3062                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3063                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3064         </fields>
3065         <links>
3066                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3067                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3068                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3069                 </links>
3070                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3071                         <actions>
3072                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3073                                         <context link="usr" field="home_ou" />
3074                                         <context link="ws" field="owning_lib" />
3075                                 </retrieve>
3076                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3077                                         <context link="usr" field="home_ou" />
3078                                         <context link="ws" field="owning_lib" />
3079                                 </create>
3080                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3081                                         <context link="usr" field="home_ou" />
3082                                         <context link="ws" field="owning_lib" />
3083                                 </update>
3084                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3085                                         <context link="usr" field="home_ou" />
3086                                         <context link="ws" field="owning_lib" />
3087                                 </delete>
3088                         </actions>
3089                 </permacrud>
3090         </class>
3091         <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">
3092                 <fields oils_persist:primary="name">
3093                         <field name="name" reporter:datatype="text"/>
3094                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3095                 </fields>
3096                 <links/>
3097                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3098                         <actions>
3099                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3100                                 <retrieve/>
3101                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3102                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3103                         </actions>
3104                 </permacrud>
3105         </class>
3106         <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">
3107                 <fields oils_persist:primary="name">
3108                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3109                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3110                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
3111                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3112                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
3113                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3114                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3115                 </fields>
3116                 <links>
3117                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3118                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3119                 </links>
3120                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3121                         <actions>
3122                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3123                                 <retrieve/>
3124                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3125                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3126                         </actions>
3127                 </permacrud>
3128         </class>
3129         <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">
3130                 <fields oils_persist:primary="name">
3131                         <field name="name" reporter:datatype="text"/>
3132                         <field name="label" reporter:datatype="text"/>
3133                         <field name="description" reporter:datatype="text"/>
3134                         <field name="datatype" reporter:datatype="text"/>
3135                         <field name="view_perm" reporter:datatype="link"/>
3136                         <field name="update_perm" reporter:datatype="link"/>
3137                         <field name="fm_class" reporter:datatype="text"/>
3138                         <field name="grp" reporter:datatype="link"/>
3139                 </fields>
3140                 <links>
3141                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3142                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3143                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3144                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3145                 </links>
3146                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3147                         <actions>
3148                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3149                                 <retrieve/>
3150                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3151                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3152                         </actions>
3153                 </permacrud>
3154         </class>
3155         <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">
3156                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3157                         <field name="id" />
3158                         <field name="name"  reporter:datatype="text"/>
3159                         <field name="org_unit" reporter:datatype="org_unit"/>
3160                         <field name="value"  reporter:datatype="text"/>
3161                 </fields>
3162                 <links>
3163                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3164                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3165                 </links>
3166         </class>
3167         <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">
3168                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3169                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3170                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3171                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3172                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3173                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3174                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3175                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3176                 </fields>
3177                 <links>
3178                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3179                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3180                 </links>
3181         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3182             <actions>
3183                 <create permission="CREATE_COPY_NOTE">
3184                     <context link="owning_copy" field="circ_lib"/>
3185                 </create>
3186                 <retrieve permission="VIEW_COPY_NOTES">
3187                     <context link="owning_copy" field="circ_lib"/>
3188                 </retrieve>
3189                 <update permission="UPDATE_COPY_NOTE">
3190                     <context link="owning_copy" field="circ_lib"/>
3191                 </update>
3192                 <delete permission="DELETE_COPY_NOTE">
3193                     <context link="owning_copy" field="circ_lib"/>
3194                 </delete>
3195             </actions>
3196         </permacrud>
3197         </class>
3198         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3199                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3200                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3201                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3202                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3203                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3204                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3205                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3206                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3207                 </fields>
3208                 <links>
3209                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3210                 </links>
3211         </class>
3212         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3213                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3214                         <field name="fingerprint"  reporter:datatype="text"/>
3215                         <field name="id" reporter:datatype="id" />
3216                         <field name="master_record" reporter:datatype="link"/>
3217                         <field name="mods"  reporter:datatype="text"/>
3218                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3219                 </fields>
3220                 <links>
3221                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3222                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3223                 </links>
3224         </class>
3225         <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">
3226                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3227                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3228                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3229                 </fields>
3230                 <links/>
3231         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3232             <actions>
3233                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3234                 <retrieve/>
3235                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3236                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3237             </actions>
3238         </permacrud>
3239         </class>
3240         <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">
3241                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3242                         <field name="code"  reporter:datatype="text"/>
3243                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3244                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3245                 </fields>
3246                 <links/>
3247         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3248             <actions>
3249                 <create permission="CREATE_PERM" global_required="true"/>
3250                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3251                 <update permission="UPDATE_PERM" global_required="true"/>
3252                 <delete permission="DELETE_PERM" global_required="true"/>
3253             </actions>
3254         </permacrud>
3255         </class>
3256         <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">
3257                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3258                         <field name="id" reporter:datatype="id" />
3259                         <field name="metarecord" reporter:datatype="link"/>
3260                         <field name="source" reporter:datatype="link"/>
3261                 </fields>
3262                 <links>
3263                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3264                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3265                 </links>
3266         </class>
3267         <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">
3268                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3269                         <field name="id" reporter:datatype="id" />
3270                         <field name="field" reporter:datatype="link"/>
3271                         <field name="source" reporter:datatype="link"/>
3272                         <field name="value"  reporter:datatype="text"/>
3273                 </fields>
3274                 <links>
3275                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3276                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3277                 </links>
3278         </class>
3279         <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">
3280                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3281                         <field name="id" reporter:datatype="id" />
3282                         <field name="value" reporter:datatype="text"/>
3283                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3284                 </fields>
3285                 <links>
3286                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3287                 </links>
3288         </class>
3289         <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">
3290                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3291                         <field name="id" reporter:datatype="id" />
3292                         <field name="entry" reporter:datatype="link"/>
3293                         <field name="def" reporter:datatype="link"/>
3294                         <field name="source" reporter:datatype="link"/>
3295                 </fields>
3296                 <links>
3297                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3298                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3299                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3300                 </links>
3301         </class>
3302         <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">
3303                 <oils_persist:source_definition>
3304                         SELECT * FROM metabib.author_field_entry
3305                                                 UNION ALL
3306                         SELECT * FROM metabib.keyword_field_entry
3307                                                 UNION ALL
3308                         SELECT * FROM metabib.identifier_field_entry
3309                                                 UNION ALL
3310                         SELECT * FROM metabib.title_field_entry
3311                                                 UNION ALL
3312                         SELECT * FROM metabib.subject_field_entry
3313                                                 UNION ALL
3314                         SELECT * FROM metabib.series_field_entry
3315                 </oils_persist:source_definition>
3316                 <fields>
3317                         <field name="field" reporter:datatype="link"/>
3318                         <field name="id" reporter:datatype="id" />
3319                         <field name="source" reporter:datatype="link"/>
3320                         <field name="value"  reporter:datatype="text"/>
3321                 </fields>
3322                 <links>
3323                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3324                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3325                 </links>
3326         </class>
3327         <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">
3328                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3329                         <field name="field" reporter:datatype="link"/>
3330                         <field name="id" reporter:datatype="id" />
3331                         <field name="source" reporter:datatype="link"/>
3332                         <field name="value"  reporter:datatype="text"/>
3333                 </fields>
3334                 <links>
3335                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3336                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3337                 </links>
3338         </class>
3339         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
3340                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3341                         <field name="accepting_usr" reporter:datatype="link"/>
3342                         <field name="amount" reporter:datatype="money" />
3343                         <field name="amount_collected" reporter:datatype="money" />
3344                         <field name="cash_drawer" reporter:datatype="link"/>
3345                         <field name="id" reporter:datatype="id" />
3346                         <field name="note"  reporter:datatype="text"/>
3347                         <field name="payment_ts" reporter:datatype="timestamp"/>
3348                         <field name="xact" reporter:datatype="link"/>
3349                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3350                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3351                 </fields>
3352                 <links>
3353                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3354                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3355                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3356                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3357                 </links>
3358         </class>
3359         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
3360                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3361                         <field name="accepting_usr" reporter:datatype="link"/>
3362                         <field name="amount" reporter:datatype="money" />
3363                         <field name="amount_collected" reporter:datatype="money" />
3364                         <field name="id" reporter:datatype="id" />
3365                         <field name="note"  reporter:datatype="text"/>
3366                         <field name="payment_ts" reporter:datatype="timestamp"/>
3367                         <field name="xact" reporter:datatype="link"/>
3368                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3369                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3370                 </fields>
3371                 <links>
3372                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3373                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3374                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3375                 </links>
3376         </class>
3377         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3378                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3379                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3380                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3381                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3382                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3383                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3384                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3385                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3386                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3387                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3388                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3389                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3390                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3391                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3392                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3393                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3394                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3395                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3396                 </fields>
3397                 <links>
3398                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3399                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3400                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3401                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3402                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3403                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3404                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3405                 </links>
3406         </class>
3407
3408         <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">
3409                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3410                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3411                         <field name="name"  reporter:datatype="text"/>
3412                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3413                         <field name="block_list" reporter:datatype="text"/>
3414                         <field name="staff_alert" reporter:datatype="bool"/>
3415                         <field name="org_depth" reporter:datatype="int"/>
3416                 </fields>
3417                 <links/>
3418         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3419             <actions>
3420                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3421                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3422                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3423                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3424             </actions>
3425         </permacrud>
3426         </class>
3427         <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">
3428                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3429                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3430                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3431                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3432                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3433                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3434                 </fields>
3435                 <links>
3436                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3437                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3438                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3439         </links>
3440         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3441             <actions>
3442                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3443                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3444                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3445                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3446             </actions>
3447         </permacrud>
3448         </class>
3449         <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">
3450                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3451                         <field name="holdable" reporter:datatype="bool"/>
3452                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3453                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3454                         <field name="opac_visible" reporter:datatype="bool"/>
3455             <field name="copy_active" reporter:datatype="bool"/>
3456             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3457                 </fields>
3458                 <links/>
3459         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3460             <actions>
3461                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3462                 <retrieve/>
3463                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3464                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3465             </actions>
3466         </permacrud>
3467         </class>
3468         <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">
3469                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3470                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3471                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3472                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3473                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3474                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3475                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3476                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3477                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3478                 </fields>
3479                 <links>
3480                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3481                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3482                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3483                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3484                 </links>
3485                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3486                         <actions>
3487                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3488                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3489                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3490                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3491                         </actions>
3492                 </permacrud>
3493         </class>
3494         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3495                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3496                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3497                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3498                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3499                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3500                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3501                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3502                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3503                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3504                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3505                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3506                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3507                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3508                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3509                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3510                 </fields>
3511                 <links>
3512                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3513                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3514                 </links>
3515         </class>
3516         <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">
3517                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3518                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3519                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3520                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3521                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3522                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3523                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3524                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3525                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3526                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3527                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3528                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3529                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3530                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3531                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3532                 </fields>
3533                 <links>
3534                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3535                 </links>
3536                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3537                         <actions>
3538                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3539                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3540                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3541                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3542                         </actions>
3543                 </permacrud>
3544         </class>
3545
3546
3547         <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">
3548                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3549                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3550                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3551                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3552                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3553                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3554                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3555                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3556                 </fields>
3557                 <links>
3558                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3559                 </links>
3560         </class>
3561
3562         <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">
3563                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3564                         <field name="call_number" />
3565                         <field name="create_date" reporter:datatype="timestamp"/>
3566                         <field name="creator" reporter:datatype="link"/>
3567                         <field name="id" reporter:datatype="id" />
3568                         <field name="pub" reporter:datatype="bool"/>
3569                         <field name="title"  reporter:datatype="text"/>
3570                         <field name="value"  reporter:datatype="text"/>
3571                 </fields>
3572                 <links>
3573                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3574                 </links>
3575         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3576             <actions>
3577                 <create permission="CREATE_VOLUME_NOTE">
3578                     <context link="call_number" field="owning_lib"/>
3579                 </create>
3580                 <retrieve permission="VIEW_VOLUME_NOTES">
3581                     <context link="call_number" field="owning_lib"/>
3582                 </retrieve>
3583                 <update permission="UPDATE_VOLUME_NOTE">
3584                     <context link="call_number" field="owning_lib"/>
3585                 </update>
3586                 <delete permission="DELETE_VOLUME_NOTE">
3587                     <context link="call_number" field="owning_lib"/>
3588                 </delete>
3589             </actions>
3590         </permacrud>
3591         </class>
3592         <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">
3593                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3594                         <field name="create_date" reporter:datatype="timestamp"/>
3595                         <field name="creator" reporter:datatype="link"/>
3596                         <field name="edit_date" reporter:datatype="timestamp"/>
3597                         <field name="editor" reporter:datatype="link"/>
3598                         <field name="id" reporter:datatype="id" />
3599                         <field name="record" reporter:datatype="link"/>
3600                         <field name="value" reporter:datatype="text"/>
3601                 </fields>
3602                 <links>
3603                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3604                 </links>
3605         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3606             <actions>
3607                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3608                 <retrieve/>
3609                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3610                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3611             </actions>
3612         </permacrud>
3613         </class>
3614         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3615         <oils_persist:source_definition>
3616 SELECT  usr,
3617         SUM(
3618             CASE
3619                 WHEN (
3620                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3621                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3622                 ) THEN 1
3623                 ELSE 0
3624             END
3625         ) AS out,
3626
3627         SUM(
3628             CASE
3629                 WHEN (
3630                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3631                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3632                 ) THEN 1
3633                 ELSE 0
3634             END
3635         ) AS overdue,
3636
3637         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3638         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
3639         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3640   FROM  action.circulation
3641   WHERE checkin_time IS NULL
3642   GROUP BY 1
3643         </oils_persist:source_definition>
3644         <fields oils_persist:primary="usr">
3645             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3646             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3647             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3648             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3649             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3650             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3651         </fields>
3652         <links>
3653             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3654         </links>
3655         </class>
3656         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3657         <oils_persist:source_definition>
3658 SELECT  usr,
3659         ARRAY_TO_STRING(ARRAY_ACCUM(
3660             CASE
3661                 WHEN (
3662                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3663                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3664                 ) THEN id
3665                 ELSE 0
3666             END
3667         ),',') AS out,
3668
3669         ARRAY_TO_STRING(ARRAY_ACCUM(
3670             CASE
3671                 WHEN (
3672                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3673                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3674                 ) THEN id
3675                 ELSE 0
3676             END
3677         ),',') AS overdue,
3678
3679         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
3680         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
3681         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
3682   FROM  action.circulation
3683   WHERE checkin_time IS NULL
3684   GROUP BY 1
3685         </oils_persist:source_definition>
3686         <fields oils_persist:primary="usr">
3687             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3688             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3689             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3690             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3691             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3692             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3693         </fields>
3694         <links>
3695             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3696         </links>
3697         </class>
3698         <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">
3699                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3700                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3701                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3702                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3703                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3704                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3705                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3706                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3707                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3708                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3709                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3710                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3711                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3712                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3713                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3714                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3715                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3716                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3717                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3718                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3719                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3720                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3721                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3722                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3723                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3724                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3725                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3726                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3727                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3728                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3729                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3730                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3731                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3732                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3733                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3734                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3735                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3736                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3737                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3738                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3739                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3740                 </fields>
3741                 <links>
3742                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3743                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3744                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3745                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3746                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3747                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3748                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3749                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3750                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3751                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3752                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3753                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3754                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3755                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3756                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3757                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3758                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3759                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3760                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3761                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3762                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3763                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3764                 </links>
3765                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3766                         <actions>
3767                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
3768                         </actions>
3769                 </permacrud>
3770         </class>
3771         <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">
3772                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3773                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3774                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3775                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3776                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3777                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3778                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3779                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3780                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3781                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3782                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3783                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3784                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3785                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3786                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3787                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3788                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3789                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3790                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3791                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3792                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3793                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3794                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3795                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3796                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3797                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3798                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3799                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3800                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3801                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3802                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3803                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3804                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3805                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3806                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3807                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3808                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3809                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3810                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3811                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3812                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3813                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3814                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3815                 </fields>
3816                 <links>
3817                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3818                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3819                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3820                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3821                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3822                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3823                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3824                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3825                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3826                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3827                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3828                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3829                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3830                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3831                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3832                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3833                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3834                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3835                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3836                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3837                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3838                 </links>
3839         </class>
3840         <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">
3841                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3842                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3843                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3844                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3845                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3846                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3847                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3848                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3849                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3850                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3851                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3852                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3853                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3854                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3855                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3856                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3857                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3858                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3859                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3860                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3861                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3862                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3863                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3864                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3865                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3866                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3867                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3868                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3869                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3870                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3871                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3872                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3873                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3874                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3875                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3876                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3877                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3878                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3879                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3880                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3881                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3882                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3883                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3884                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3885                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3886                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3887                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3888                 </fields>
3889                 <links>
3890                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3891                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3892                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3893                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3894                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3895                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3896                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3897                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3898                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3899                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3900                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3901                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3902                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3903                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3904                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3905                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3906                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3907                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3908                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3909                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3910                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3911                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3912                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3913                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3914                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3915                 </links>
3916         </class>
3917
3918         <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">
3919                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3920                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3921                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3922                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3923                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3924                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3925                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3926                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3927                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3928                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3929                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3930                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3931                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3932                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3933                 </fields>
3934                 <links>
3935                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3936                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3937                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3938                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3939                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3940                 </links>
3941                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3942                         <actions>
3943                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3944                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3945                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3946                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3947                         </actions>
3948                 </permacrud>
3949         </class>
3950
3951         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3952                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3953                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3954                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3955                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3956                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3957                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3958                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3959                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3960                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3961                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3962                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3963                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3964                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3965                 </fields>
3966                 <links>
3967                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3968                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3969                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3970                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3971                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3972                 </links>
3973                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3974                         <actions>
3975                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3976                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3977                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3978                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3979                         </actions>
3980                 </permacrud>
3981         </class>
3982         
3983         <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">
3984                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3985                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3986                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3987                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3988                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3989                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3990                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3991                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3992                 </fields>
3993                 <links>
3994                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3995                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3996                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3997                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3998                 </links>
3999                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4000                         <actions>
4001                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4002                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4003                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4004                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4005                         </actions>
4006                 </permacrud>
4007         </class>
4008         
4009         <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">
4010                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4011                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4012                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4013                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4014                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4015                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4016                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4017                 </fields>
4018                 <links>
4019                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4020                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4021                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4022                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4023                 </links>
4024                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4025                         <actions>
4026                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4027                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4028                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4029                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4030                         </actions>
4031                 </permacrud>
4032         </class>
4033         
4034         <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">
4035                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4036                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4037                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4038                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4039                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4040                 </fields>
4041                 <links>
4042                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4043                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4044                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4045                 </links>
4046                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4047                         <actions>
4048                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4049                     <context link="resource" field="owner" />
4050                 </create>
4051                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4052                     <context link="resource" field="owner" />
4053                 </retrieve>
4054                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4055                     <context link="resource" field="owner" />
4056                 </update>
4057                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4058                     <context link="resource" field="owner" />
4059                 </delete>
4060                         </actions>
4061                 </permacrud>
4062         </class>
4063         
4064         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4065                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4066                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4067                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4068                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4069                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4070                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4071                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4072                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4073                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4074                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4075                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4076                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4077                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4078                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4079                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4080                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4081                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4082                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4083                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4084                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4085                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4086                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4087                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4088                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4089                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4090                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4091                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4092                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4093                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4094                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4095                 </fields>
4096                 <links>
4097                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4098                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4099                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4100                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4101                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4102                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4103                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4104                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4105                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4106                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4107                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4108                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4109                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4110                 </links>
4111                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4112                         <actions>
4113                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4114                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4115                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4116                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4117                         </actions>
4118                 </permacrud>
4119         </class>
4120         
4121         <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">
4122                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4123                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4124                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4125                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4126                 </fields>
4127                 <links>
4128                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4129                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4130                 </links>
4131                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4132                         <actions>
4133                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4134                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4135                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4136                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4137                         </actions>
4138                 </permacrud>
4139         </class>
4140
4141         <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">
4142                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4143                         <field name="bucket" reporter:datatype="link"/>
4144                         <field name="id" reporter:datatype="id" />
4145                         <field name="target_call_number" reporter:datatype="link" />
4146                         <field name="create_time" reporter:datatype="timestamp" />
4147                         <field name="pos" reporter:datatype="int" />
4148                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4149                 </fields>
4150                 <links>
4151                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4152                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4153             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4154                 </links>
4155         </class>
4156         <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">
4157                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4158                         <field name="id" reporter:datatype="id" />
4159                         <field name="item" reporter:datatype="link"/>
4160                         <field name="note" reporter:datatype="text" />
4161                 </fields>
4162                 <links>
4163                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4164                 </links>
4165         </class>
4166         <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">
4167                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4168                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4169                         <field name="btype" reporter:datatype="text"/>
4170                         <field name="id" reporter:datatype="id" />
4171                         <field name="name" reporter:datatype="text"/>
4172                         <field name="description" reporter:datatype="text"/>
4173                         <field name="owner" reporter:datatype="link"/>
4174                         <field name="pub" reporter:datatype="bool"/>
4175                         <field name="create_time" reporter:datatype="timestamp" />
4176                 </fields>
4177                 <links>
4178                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4179                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4180                 </links>
4181         </class>
4182         <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">
4183                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4184                         <field name="id" reporter:datatype="id" />
4185                         <field name="bucket" reporter:datatype="link"/>
4186                         <field name="note" reporter:datatype="text" />
4187                 </fields>
4188                 <links>
4189                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4190                 </links>
4191         </class>
4192         <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">
4193                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4194                         <field name="hold" reporter:datatype="link"/>
4195                         <field name="id" reporter:datatype="id" />
4196                         <field name="target_copy" reporter:datatype="link"/>
4197                         <field name="proximity" reporter:datatype="number"/>
4198                 </fields>
4199                 <links>
4200                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4201                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4202                 </links>
4203         </class>
4204         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
4205                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4206                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4207                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4208                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4209                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4210                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4211                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4212                 </fields>
4213                 <links>
4214                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4215                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4216                 </links>
4217         </class>
4218         <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">
4219                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4220                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4221                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4222                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4223                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4224                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4225                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4226                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4227                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4228                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4229                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4230                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4231                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4232                 </fields>
4233                 <links>
4234                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4235                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4236                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4237                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4238                 </links>
4239         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4240             <actions>
4241                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4242                 <retrieve/>
4243                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4244                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4245             </actions>
4246         </permacrud>
4247         </class>
4248         <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">
4249                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4250                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4251                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4252                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4253                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4254             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4255             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4256             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4257                 </fields>
4258                 <links>
4259                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4260                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4261                 </links>
4262         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4263             <actions>
4264                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4265                 <retrieve/>
4266                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4267                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4268             </actions>
4269         </permacrud>
4270         </class>
4271         <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">
4272                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4273                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4274             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4275             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4276                 </fields>
4277                 <links>
4278                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4279                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4280                 </links>
4281         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4282             <actions>
4283                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4284                                         <context link="lgroup" field="owner" />
4285                 </create>
4286                 <retrieve/>
4287                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4288                                         <context link="lgroup" field="owner" />
4289                 </update>
4290                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4291                                         <context link="lgroup" field="owner" />
4292                 </delete>
4293             </actions>
4294         </permacrud>
4295         </class>
4296
4297     <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">
4298         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4299             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4300             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4301             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4302             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4303         </fields>
4304         <links>
4305             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4306             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4307         </links>
4308         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4309             <actions>
4310                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4311                 <retrieve/>
4312                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4313                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4314             </actions>
4315         </permacrud>
4316     </class>
4317
4318         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4319                 <fields>
4320                         <field name="sre_id" oils_persist:virtual="true" />
4321                         <field name="location" oils_persist:virtual="true" />
4322                         <field name="owning_lib" oils_persist:virtual="true" />
4323                         <field name="basic_holdings" oils_persist:virtual="true" />
4324                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4325                         <field name="supplement_holdings" oils_persist:virtual="true" />
4326                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4327                         <field name="index_holdings" oils_persist:virtual="true" />
4328                         <field name="index_holdings_add" oils_persist:virtual="true" />
4329                         <field name="online" oils_persist:virtual="true" />
4330                         <field name="missing" oils_persist:virtual="true" />
4331                         <field name="incomplete" oils_persist:virtual="true" />
4332                 </fields>
4333         </class>
4334
4335         <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">
4336                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4337                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4338                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4339                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4340                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4341                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4342                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4343                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4344                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4345                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4346                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4347                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4348                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4349                 </fields>
4350                 <links>
4351                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4352                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4353                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4354                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4355                 </links>
4356                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4357                         <actions>
4358                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4359                                 <retrieve/>
4360                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4361                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4362                         </actions>
4363                 </permacrud>
4364         </class>
4365
4366         <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">
4367                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4368                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4369                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4370                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4371                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4372                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4373                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4374                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4375                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4376                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4377                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4378                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4379                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4380                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4381                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4382                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4383                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4384                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4385                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4386                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4387                 </fields>
4388                 <links>
4389                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4390                 </links>
4391                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4392                         <actions>
4393                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4394                                         <context link="subscription" field="owning_lib" />
4395                                 </create>
4396                                 <retrieve />
4397                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4398                                         <context link="subscription" field="owning_lib" />
4399                                 </update>
4400                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4401                                         <context link="subscription" field="owning_lib" />
4402                                 </delete>
4403                         </actions>
4404                 </permacrud>
4405         </class>
4406
4407         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4408                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4409                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4410                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4411                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4412                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4413                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4414                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4415                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4416                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4417                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4418                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4419                 </fields>
4420                 <links>
4421                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4422                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4423                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4424                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4425                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4426                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4427                 </links>
4428                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4429                         <actions>
4430                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4431                                 <retrieve />
4432                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4433                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4434                         </actions>
4435                 </permacrud>
4436         </class>
4437
4438         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4439                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4440                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4441                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4442                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4443                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4444                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4445                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4446                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4447                 </fields>
4448                 <links>
4449                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4450                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4451                 </links>
4452         </class>
4453
4454         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4455                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4456                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4457                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4458                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4459                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4460                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4461                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4462                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4463                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4464                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4465                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4466                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4467                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4468                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4469                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4470                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4471                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4472                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4473                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4474                 </fields>
4475                 <links>
4476                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4477                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4478                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4479                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4480                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4481                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4482                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4483                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4484                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4485                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4486                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4487                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4488                 </links>
4489                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4490                         <actions>
4491                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4492                                 <retrieve />
4493                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4494                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4495                         </actions>
4496                 </permacrud>
4497         </class>
4498
4499         <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">
4500                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4501                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4502                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4503                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4504                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4505                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4506                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4507                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4508                 </fields>
4509                 <links>
4510                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4511                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4512                 </links>
4513                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4514                         <actions>
4515                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4516                                         <context link="distribution" field="holding_lib" />
4517                                 </create>
4518                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4519                                         <context link="distribution" field="holding_lib" />
4520                                 </retrieve>
4521                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4522                                         <context link="distribution" field="holding_lib" />
4523                                 </update>
4524                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4525                                         <context link="distribution" field="holding_lib" />
4526                                 </delete>
4527                         </actions>
4528                 </permacrud>
4529         </class>
4530
4531         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4532                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4533                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4534                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4535                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4536                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4537                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4538                 </fields>
4539                 <links>
4540                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4541                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4542                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4543                 </links>
4544                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4545                         <actions>
4546                                 <create permission="ADMIN_SERIAL_STREAM">
4547                                         <context link="distribution" field="holding_lib" />
4548                                 </create>
4549                                 <retrieve />
4550                                 <update permission="ADMIN_SERIAL_STREAM">
4551                                         <context link="distribution" field="holding_lib" />
4552                                 </update>
4553                                 <delete permission="ADMIN_SERIAL_STREAM">
4554                                         <context link="distribution" field="holding_lib" />
4555                                 </delete>
4556                         </actions>
4557                 </permacrud>
4558         </class>
4559
4560         <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">
4561                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4562                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4563                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4564                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4565                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4566                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4567                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4568                 </fields>
4569                 <links>
4570                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4571                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4572                 </links>
4573                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4574                         <actions>
4575                                 <create permission="ADMIN_SERIAL_STREAM">
4576                                         <context link="stream" jump="distribution" field="holding_lib" />
4577                                 </create>
4578                                 <retrieve permission="RECEIVE_SERIAL">
4579                                         <context link="stream" jump="distribution" field="holding_lib" />
4580                                 </retrieve>
4581                                 <update permission="ADMIN_SERIAL_STREAM">
4582                                         <context link="stream" jump="distribution" field="holding_lib" />
4583                                 </update>
4584                                 <delete permission="ADMIN_SERIAL_STREAM">
4585                                         <context link="stream" jump="distribution" field="holding_lib" />
4586                                 </delete>
4587                         </actions>
4588                 </permacrud>
4589         </class>
4590
4591         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4592                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4593                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4594                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4595                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4596                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4597                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4598                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4599                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4600                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4601                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4602                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4603                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4604                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4605                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4606                 </fields>
4607                 <links>
4608                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4609                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4610                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4611                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4612                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4613                 </links>
4614                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4615                         <actions>
4616                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4617                                         <context link="subscription" field="owning_lib" />
4618                                 </create>
4619                                 <retrieve/>
4620                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4621                                         <context link="subscription" field="owning_lib" />
4622                                 </update>
4623                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4624                                         <context link="subscription" field="owning_lib" />
4625                                 </delete>
4626                         </actions>
4627                 </permacrud>
4628         </class>
4629
4630         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4631                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4632                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4633                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4634                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4635                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4636                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4637                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4638                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4639                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4640                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4641                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4642                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4643                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4644                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4645                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4646                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4647                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4648                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4649                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4650                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4651                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4652                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4653                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4654                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4655                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4656                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4657                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4658                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4659                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4660                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4661                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4662                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4663                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4664                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4665                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4666                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4667                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4668                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4669                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4670                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4671                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4672                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4673                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4674                 </fields>
4675                 <links>
4676                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4677                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4678                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4679                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4680                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4681                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4682                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4683                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4684                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4685                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4686                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4687                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4688                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4689                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4690                 </links>
4691                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4692                         <actions>
4693                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4694                                 <retrieve/>
4695                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4696                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4697                         </actions>
4698                 </permacrud>
4699         </class>
4700
4701         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4702                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4703                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4704                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4705                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4706                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4707                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4708                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4709                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4710                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4711                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4712                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4713                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4714                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4715                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4716                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4717                 </fields>
4718                 <links>
4719                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4720                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4721                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4722                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4723                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4724                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4725                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4726                 </links>
4727                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4728                         <actions>
4729                                 <create permission="ADMIN_SERIAL_ITEM">
4730                                         <context link="stream" jump="distribution" field="holding_lib" />
4731                                 </create>
4732                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4733                                         <context link="stream" jump="distribution" field="holding_lib" />
4734                                 </retrieve>
4735                                 <update permission="ADMIN_SERIAL_ITEM">
4736                                         <context link="stream" jump="distribution" field="holding_lib" />
4737                                 </update>
4738                                 <delete permission="ADMIN_SERIAL_ITEM">
4739                                         <context link="stream" jump="distribution" field="holding_lib" />
4740                                 </delete>
4741                         </actions>
4742                 </permacrud>
4743         </class>
4744
4745         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4746                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4747                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4748                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4749                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4750                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4751                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4752                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4753                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4754                 </fields>
4755                 <links>
4756                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4757                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4758                 </links>
4759                 <!-- Not available via PCRUD at this time -->
4760         </class>
4761         <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">
4762                 <fields>
4763                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
4764                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
4765                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
4766                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
4767                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
4768                 </fields>
4769                 <links>
4770                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4771                 </links>
4772         </class>
4773         <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">
4774                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
4775                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4776                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
4777                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
4778                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
4779                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
4780                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
4781                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
4782                 </fields>
4783                 <links>
4784                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4785                 </links>
4786         </class>
4787         <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">
4788                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_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="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4792                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4793                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4794                 </fields>
4795                 <links>
4796                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4797                 </links>
4798                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4799                         <actions>
4800                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4801                                         <context link="distribution" field="holding_lib" />
4802                                 </create>
4803                                 <retrieve/>
4804                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4805                                         <context link="distribution" field="holding_lib" />
4806                                 </update>
4807                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4808                                         <context link="distribution" field="holding_lib" />
4809                                 </delete>
4810                         </actions>
4811                 </permacrud>
4812         </class>
4813
4814         <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">
4815                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4816                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4817                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4818                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4819                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4820                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4821                 </fields>
4822                 <links>
4823                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4824                 </links>
4825                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4826                         <actions>
4827                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4828                                         <context link="distribution" field="holding_lib" />
4829                                 </create>
4830                                 <retrieve/>
4831                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4832                                         <context link="distribution" field="holding_lib" />
4833                                 </update>
4834                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4835                                         <context link="distribution" field="holding_lib" />
4836                                 </delete>
4837                         </actions>
4838                 </permacrud>
4839         </class>
4840
4841         <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">
4842                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4843                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4844                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4845                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4846                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4847                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4848                 </fields>
4849                 <links>
4850                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4851                 </links>
4852                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4853                         <actions>
4854                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4855                                         <context link="distribution" field="holding_lib" />
4856                                 </create>
4857                                 <retrieve/>
4858                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4859                                         <context link="distribution" field="holding_lib" />
4860                                 </update>
4861                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4862                                         <context link="distribution" field="holding_lib" />
4863                                 </delete>
4864                         </actions>
4865                 </permacrud>
4866         </class>
4867
4868         <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">
4869                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4870                         <field name="id" reporter:datatype="id" />
4871                         <field name="owning_copy" reporter:datatype="link"/>
4872                         <field name="stat_cat" reporter:datatype="link"/>
4873                         <field name="stat_cat_entry" reporter:datatype="link"/>
4874                 </fields>
4875                 <links>
4876                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4877                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4878                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4879                 </links>
4880         </class>
4881         <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">
4882                 <fields oils_persist:primary="code">
4883                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4884                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4885                 </fields>
4886                 <links/>
4887         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4888             <actions>
4889                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4890                 <retrieve/>
4891                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4892                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4893             </actions>
4894         </permacrud>
4895         </class>
4896         <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">
4897                 <fields oils_persist:primary="code">
4898                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4899                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4900                 </fields>
4901                 <links/>
4902         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4903             <actions>
4904                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4905                 <retrieve/>
4906                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4907                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4908             </actions>
4909         </permacrud>
4910         </class>
4911         <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">
4912                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4913                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4914                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4915                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4916                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4917                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4918                 </fields>
4919                 <links>
4920             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4921         </links>
4922         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4923             <actions>
4924                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4925                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4926                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4927                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4928             </actions>
4929         </permacrud>
4930         </class>
4931         <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">
4932                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4933                         <field name="id" reporter:datatype="id" />
4934                         <field name="name" reporter:datatype="text"/>
4935                 </fields>
4936                 <links/>
4937         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4938             <actions>
4939                 <create permission="CREATE_LASSO" global_required="true"/>
4940                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4941                 <update permission="UPDATE_LASSO" global_required="true"/>
4942                 <delete permission="DELETE_LASSO" global_required="true"/>
4943             </actions>
4944         </permacrud>
4945         </class>
4946         <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">
4947                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4948                         <field name="id" reporter:datatype="id" />
4949                         <field name="lasso" reporter:datatype="link"/>
4950                         <field name="org_unit" reporter:datatype="org_unit"/>
4951                 </fields>
4952                 <links>
4953                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4954                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4955                 </links>
4956         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4957             <actions>
4958                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4959                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4960                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4961                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4962             </actions>
4963         </permacrud>
4964         </class>
4965         <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">
4966                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
4967                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4968                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
4969                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
4970                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
4971                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
4972                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
4973                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
4974                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
4975                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
4976                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
4977                 </fields>
4978                 <links>
4979                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4980                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4981                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4982                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
4983                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
4984                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4985                 </links>
4986         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4987             <actions>
4988                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4989                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4990                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4991                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4992             </actions>
4993         </permacrud>
4994         </class>
4995         <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">
4996                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4997                         <field name="id" reporter:datatype="id" />
4998                         <field name="from_org" reporter:datatype="org_unit"/>
4999                         <field name="to_org" reporter:datatype="org_unit"/>
5000                         <field name="prox" reporter:datatype="int" />
5001                 </fields>
5002                 <links>
5003                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5004                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5005                 </links>
5006         </class>
5007         <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">
5008                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5009                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5010                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5011                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5012                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5013                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5014                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5015                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5016                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5017                 </fields>
5018                 <links/>
5019         </class>
5020         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5021                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5022                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5023                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5024                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5025                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5026                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5027                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5028                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5029                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5030                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5031                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5032                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5033                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5034                 </fields>
5035                 <links>
5036                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5037                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5038                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5039                 </links>
5040         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5041             <actions>
5042                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5043                 <retrieve/>
5044                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5045                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5046             </actions>
5047         </permacrud>
5048         </class>
5049         <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">
5050                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5051                         <field name="address_type"  reporter:datatype="text"/>
5052                         <field name="city"  reporter:datatype="text"/>
5053                         <field name="country"  reporter:datatype="text"/>
5054                         <field name="county"  reporter:datatype="text"/>
5055                         <field name="id" reporter:datatype="id" />
5056                         <field name="org_unit" reporter:datatype="org_unit"/>
5057                         <field name="post_code"  reporter:datatype="text"/>
5058                         <field name="state"  reporter:datatype="text"/>
5059                         <field name="street1"  reporter:datatype="text"/>
5060                         <field name="street2"  reporter:datatype="text"/>
5061                         <field name="valid" reporter:datatype="bool"/>
5062                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5063                 </fields>
5064                 <links>
5065                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5066                 </links>
5067         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5068             <actions>
5069                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5070                 <retrieve/>
5071                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5072                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5073             </actions>
5074         </permacrud>
5075         </class>
5076         <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">
5077                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5078                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5079                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5080                         <field name="query_text" reporter:datatype="text"/>
5081                 </fields>
5082         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5083             <actions>
5084                 <retrieve/>
5085             </actions>
5086         </permacrud>
5087         </class>
5088
5089         <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">
5090                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5091                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5092                         <field name="owner" reporter:datatype="org_unit"/>
5093                         <field name="code" reporter:datatype="text"/>
5094                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5095                         <field name="create_date" reporter:datatype="timestamp"/>
5096                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5097                 </fields>
5098                 <links>
5099                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5100                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5101                 </links>
5102         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5103             <actions>
5104                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5105                 <retrieve/>
5106                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5107                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5108             </actions>
5109         </permacrud>
5110         </class>
5111         <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">
5112                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5113                         <field name="id" reporter:datatype="id"/>
5114                         <field name="grp" reporter:datatype="link"/>
5115                         <field name="pos" reporter:datatype="int"/>
5116                         <field name="query" reporter:datatype="link"/>
5117                 </fields>
5118                 <links>
5119                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5120                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5121                 </links>
5122         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5123             <actions>
5124                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5125                     <context link="grp" field="owner"/>
5126                 </create>
5127                 <retrieve/>
5128                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5129                     <context link="grp" field="owner"/>
5130                 </update>
5131                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5132                     <context link="grp" field="owner"/>
5133                 </delete>
5134             </actions>
5135         </permacrud>
5136         </class>
5137
5138         <!-- A note: Please update alhr and ahopl when updating ahr -->
5139         <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">
5140                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5141                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5142                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5143                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5144                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5145                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5146                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5147                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5148                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5149                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5150                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5151                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5152                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5153                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5154                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5155                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5156                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5157                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5158                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5159                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5160                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5161                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5162                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5163                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5164                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5165                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5166                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5167                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5168                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5169                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5170                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5171                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5172                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5173                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5174                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5175                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5176                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5177                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5178                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5179                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5180                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5181                 </fields>
5182                 <links>
5183                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5184                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5185                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5186                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5187                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5188                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5189                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5190                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5191                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5192                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5193                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5194                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5195                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5196                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5197                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5198                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5199                 </links>
5200                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5201                         <actions>
5202                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5203                         </actions>
5204                 </permacrud>
5205         </class>
5206         <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">
5207                 <oils_persist:source_definition><![CDATA[
5208                 SELECT
5209                         ahr.*,
5210                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5211                                 copy_location_order_position,
5212                         CASE WHEN au.alias IS NOT NULL THEN
5213                                 au.alias
5214                         ELSE
5215                                 au.first_given_name
5216                         END AS usr_alias_or_first_given_name,
5217                         au.first_given_name AS usr_first_given_name,
5218                         au.second_given_name AS usr_second_given_name,
5219                         au.family_name AS usr_family_name,
5220                         au.prefix AS usr_prefix,
5221                         au.suffix AS usr_suffix,
5222                         au.alias AS usr_alias,
5223                         CASE WHEN au.alias IS NOT NULL THEN
5224                                 au.alias
5225                         ELSE
5226                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5227                                         COALESCE(au.family_name, ''),
5228                                         COALESCE(au.suffix, ''),
5229                                         ', ',
5230                                         COALESCE(au.prefix, ''),
5231                                         COALESCE(au.first_given_name, ''),
5232                                         COALESCE(au.second_given_name, '')
5233                                 ], ' '), E'\\s+,', ',')
5234                         END AS usr_alias_or_display_name,
5235                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5236                                 COALESCE(au.family_name, ''),
5237                                 COALESCE(au.suffix, ''),
5238                                 ', ',
5239                                 COALESCE(au.prefix, ''),
5240                                 COALESCE(au.first_given_name, ''),
5241                                 COALESCE(au.second_given_name, '')
5242                         ], ' '), E'\\s+,', ',') AS usr_display_name,
5243                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5244                                 AS call_number_label,
5245                         siss.label AS issuance_label,
5246                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5247                         ahcm_1.copy_count AS potential_copies
5248                 FROM action.hold_request ahr
5249                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5250                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5251                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5252                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5253                 JOIN actor.usr au ON (au.id = ahr.usr)
5254                 JOIN (
5255                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5256                         FROM asset.copy_location
5257                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5258                 LEFT JOIN actor.usr_standing_penalty ausp 
5259                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5260                 LEFT JOIN config.standing_penalty csp
5261                         ON (
5262                                 csp.id = ausp.standing_penalty AND 
5263                                 csp.block_list LIKE '%CAPTURE%' AND (
5264                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5265                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5266                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5267                                         )
5268                                 )
5269                         )
5270                 JOIN (
5271                         SELECT COUNT(target_copy) AS copy_count, hold
5272                         FROM action.hold_copy_map
5273                         GROUP BY 2
5274                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5275                 LEFT JOIN serial.issuance siss
5276                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5277                 LEFT JOIN asset.copy_location_order acplo
5278                         ON (acp.location = acplo.location AND
5279                                 acp.circ_lib = acplo.org)
5280                 WHERE
5281                         ahr.capture_time IS NULL AND
5282                         ahr.cancel_time IS NULL AND
5283                         csp.id IS NULL AND
5284                         (ahr.expire_time is NULL OR ahr.expire_time > NOW())
5285                 ]]></oils_persist:source_definition>
5286                 <fields oils_persist:primary="id">
5287                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5288                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5289                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5290                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5291                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5292                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5293                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5294                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5295                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5296                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5297                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5298                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5299                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5300                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5301                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5302                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5303                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5304                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5305                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5306                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5307                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5308                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5309                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5310                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5311                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5312                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5313                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5314                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5315                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5316                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5317                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5318                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5319                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5320                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5321                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5322                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5323                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5324                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5325                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5326                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5327                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5328                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
5329                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
5330                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
5331                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
5332                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
5333                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
5334                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5335                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
5336                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
5337                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5338                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5339                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5340                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5341                 </fields>
5342                 <links>
5343                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5344                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5345                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5346                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5347                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5348                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5349                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5350                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5351                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5352                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5353                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5354                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5355                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5356                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5357                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5358                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5359                 </links>
5360                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5361                         <actions>
5362                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5363                         </actions>
5364                 </permacrud>
5365         </class>
5366         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5367                 <oils_persist:source_definition>
5368                         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)
5369                 </oils_persist:source_definition>
5370                 <fields oils_persist:primary="id">
5371                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5372                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5373                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5374                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5375                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5376                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5377                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5378                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5379                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5380                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5381                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5382                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5383                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5384                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5385                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5386                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5387                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5388                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5389                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5390                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5391                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5392                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5393                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5394                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5395                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5396                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5397                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5398                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5399                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5400                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5401                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5402                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5403                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5404                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5405                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5406                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5407                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5408                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5409                 </fields>
5410                 <links>
5411                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5412                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5413                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5414                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5415                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5416                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5417                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5418                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5419                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5420                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5421                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5422                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5423                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5424                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5425                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5426                 </links>
5427         </class>
5428
5429         <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">
5430                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5431                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5432                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5433                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5434                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5435                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5436                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5437                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5438                 </fields>
5439                 <links>
5440                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5441                 </links>
5442                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5443                         <actions>
5444                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5445                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5446                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5447                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5448                         </actions>
5449                 </permacrud>
5450         </class>
5451         <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">
5452                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5453                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5454                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5455                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5456                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5457                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5458                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5459                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5460                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5461                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5462                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5463                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5464                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5465                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5466                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5467                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5468                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5469                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5470                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5471                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5472                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5473                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5474                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5475                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5476                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5477                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5478                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5479                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5480                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5481                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5482                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5483                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5484                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5485                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5486                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5487                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5488                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5489                 </fields>
5490                 <links>
5491                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5492                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5493                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5494                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5495                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5496                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5497                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5498                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5499                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5500                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5501                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5502                 </links>
5503                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5504                         <actions>
5505                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5506                         </actions>
5507                 </permacrud>
5508         </class>
5509         <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">
5510                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5511                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5512                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5513                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5514                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5515                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5516                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5517                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5518                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5519                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5520                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5521                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5522                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5523                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5524                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5525                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5526                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5527                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5528                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5529                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5530                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5531                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5532                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5533                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5534                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5535                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5536                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5537                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5538                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5539                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5540                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5541                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5542                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5543                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5544                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5545                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5546                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5547                 </fields>
5548                 <links>
5549                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5550                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5551                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5552                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5553                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5554                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5555                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5556                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5557                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5558                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5559                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5560                 </links>
5561                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5562                         <actions>
5563                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5564                         </actions>
5565                 </permacrud>
5566         </class>
5567
5568         <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">
5569                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
5570                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
5571                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
5572                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
5573                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
5574                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
5575                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
5576                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5577                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
5578                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
5579                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
5580                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5581                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
5582                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5583                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
5584                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
5585                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
5586                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5587                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
5588                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
5589                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
5590                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
5591                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5592                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
5593                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
5594                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
5595                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
5596                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5597                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5598                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5599                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
5600                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
5601                 </fields>
5602                 <links>
5603                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
5604                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
5605                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
5606                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
5607                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
5608                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
5609                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5610                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
5611                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
5612                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
5613                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
5614                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
5615                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
5616                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
5617                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
5618                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
5619                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
5620                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
5621                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
5622                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
5623                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
5624                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
5625                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
5626                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
5627                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
5628                 </links>
5629         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5630             <actions>
5631                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
5632                 <retrieve />
5633                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
5634                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
5635             </actions>
5636         </permacrud>
5637         </class>
5638         <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">
5639                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
5640                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5641                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
5642                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
5643                 </fields>
5644                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5645                         <actions>
5646                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5647                                 <retrieve/>
5648                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5649                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5650                         </actions>
5651                 </permacrud>
5652         </class>
5653         <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">
5654                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
5655                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5656                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
5657                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
5658                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
5659                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
5660                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
5661                 </fields>
5662                 <links>
5663                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
5664                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5665                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
5666                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
5667                 </links>
5668                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5669                         <actions>
5670                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5671                                 <retrieve/>
5672                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5673                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5674                         </actions>
5675                 </permacrud>
5676         </class>
5677         <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">
5678                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
5679                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5680                         <field name="btype" reporter:datatype="text"/>
5681                         <field name="id" reporter:datatype="id" />
5682                         <field name="name"  reporter:datatype="text"/>
5683                         <field name="description" reporter:datatype="text"/>
5684                         <field name="owner" reporter:datatype="link"/>
5685                         <field name="pub" reporter:datatype="bool"/>
5686                         <field name="create_time" reporter:datatype="timestamp" />
5687                 </fields>
5688                 <links>
5689                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5690                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
5691                 </links>
5692         </class>
5693         <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">
5694                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
5695                         <field name="id" reporter:datatype="id" />
5696                         <field name="bucket" reporter:datatype="link"/>
5697                         <field name="note" reporter:datatype="text" />
5698                 </fields>
5699                 <links>
5700                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5701                 </links>
5702         </class>
5703         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
5704                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
5705                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5706                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5707                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5708                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5709                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5710                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5711                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5712                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5713                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5714                 </fields>
5715                 <links>
5716                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5717                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
5718                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
5719                 </links>
5720         </class>
5721         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
5722                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
5723                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
5724                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5725                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
5726                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5727                 </fields>
5728                 <links>
5729                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5730                 </links>
5731                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5732                         <actions>
5733                                 <retrieve permission="VIEW_USER">
5734                                         <context link="usr" field="home_ou" />
5735                                 </retrieve>
5736                         </actions>
5737                 </permacrud>
5738         </class>
5739     <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">
5740         <fields oils_persist:primary="field">
5741             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5742             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5743             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5744         </fields>
5745         <links/>
5746         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5747             <actions>
5748                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
5749                 <retrieve />
5750                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
5751                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
5752             </actions>
5753         </permacrud>
5754     </class>
5755         <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">
5756                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
5757                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5758                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5759                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5760                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5761                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5762                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5763                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
5764                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5765                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5766                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5767                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5768                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
5769                 </fields>
5770                 <links>
5771                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5772                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
5773                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
5774                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
5775                 </links>
5776         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5777             <actions>
5778                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
5779                 <retrieve />
5780                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
5781                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
5782             </actions>
5783         </permacrud>
5784         </class>
5785         <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">
5786                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
5787                         <field name="field" reporter:datatype="link"/>
5788                         <field name="id" reporter:datatype="id" />
5789                         <field name="source" reporter:datatype="link"/>
5790                         <field name="value"  reporter:datatype="text"/>
5791                 </fields>
5792                 <links>
5793                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5794                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5795                 </links>
5796         </class>
5797         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
5798                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
5799                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5800                         <field name="btype" reporter:datatype="text"/>
5801                         <field name="id" reporter:datatype="id" />
5802                         <field name="name"  reporter:datatype="text"/>
5803                         <field name="description" reporter:datatype="text"/>
5804                         <field name="owner" reporter:datatype="link"/>
5805                         <field name="pub" reporter:datatype="bool"/>
5806                         <field name="create_time" reporter:datatype="timestamp" />
5807                 </fields>
5808                 <links>
5809                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5810                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
5811                 </links>
5812         </class>
5813         <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">
5814                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
5815                         <field name="id" reporter:datatype="id" />
5816                         <field name="bucket" reporter:datatype="link"/>
5817                         <field name="note" reporter:datatype="text" />
5818                 </fields>
5819                 <links>
5820                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5821                 </links>
5822         </class>
5823         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
5824                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5825                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5826                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5827                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5828                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
5829                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
5830                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5831                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5832                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
5833                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5834                 </fields>
5835                 <links>
5836                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5837                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5838                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5839                 </links>
5840         </class>
5841         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
5842                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
5843                         <field name="id" reporter:datatype="id" />
5844                         <field name="ind1" />
5845                         <field name="ind2" />
5846                         <field name="record" />
5847                         <field name="subfield" />
5848                         <field name="tag" />
5849                         <field name="value" />
5850                 </fields>
5851                 <links>
5852                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
5853                 </links>
5854         </class>
5855         <class id="cnct" controller="open-ils.cstore" oils_obj:fieldmapper="config::non_cataloged_type" oils_persist:tablename="config.non_cataloged_type" reporter:label="Non-cataloged Type">
5856                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
5857                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
5858                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5859                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
5860                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5861                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
5862                 </fields>
5863                 <links>
5864                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5865                 </links>
5866         </class>
5867         <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">
5868                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
5869                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5870                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
5871                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
5872                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
5873                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5874                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5875                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
5876                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
5877                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
5878                 </fields>
5879                 <links>
5880                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
5881                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
5882                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
5883                 </links>
5884         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5885             <actions>
5886                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
5887                 <retrieve/>
5888                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
5889                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
5890             </actions>
5891         </permacrud>
5892         </class>
5893         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
5894                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
5895                         <field name="create_date" reporter:datatype="timestamp"/>
5896                         <field name="creator" reporter:datatype="link"/>
5897                         <field name="edit_date" reporter:datatype="timestamp"/>
5898                         <field name="editor" reporter:datatype="link"/>
5899                         <field name="id" reporter:datatype="id" />
5900                         <field name="pub" reporter:datatype="bool"/>
5901                         <field name="record" reporter:datatype="link"/>
5902                         <field name="value"  reporter:datatype="text"/>
5903                 </fields>
5904                 <links>
5905                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5906                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5907                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5908                 </links>
5909         </class>
5910         <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">
5911                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5912                         <field name="balance_owed" reporter:datatype="money" />
5913                         <field name="total_owed" reporter:datatype="money" />
5914                         <field name="total_paid" reporter:datatype="money" />
5915                         <field name="usr" reporter:datatype="link"/>
5916                 </fields>
5917                 <links>
5918                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5919                 </links>
5920         </class>
5921         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
5922                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5923                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
5924                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5925                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
5926                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5927                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
5928                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
5929                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5930                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5931                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5932                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5933                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5934                 </fields>
5935                 <links>
5936                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5937                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5938                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5939                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5940                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
5941                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5942                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5943                 </links>
5944         </class>
5945         <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">
5946                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
5947                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
5948                         <field name="quality" reporter:datatype="int" />
5949                         <field name="source" reporter:datatype="text"/>
5950                         <field name="transcendant" reporter:datatype="bool"/>
5951                         <field name="can_have_copies" reporter:datatype="bool"/>
5952                 </fields>
5953                 <links/>
5954         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5955             <actions>
5956                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
5957                 <retrieve/>
5958                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
5959                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
5960             </actions>
5961         </permacrud>
5962         </class>
5963         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
5964                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5965                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5966                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5967                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5968                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5969                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5970                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
5971                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5972                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5973                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5974                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5975                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5976                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5977                 </fields>
5978                 <links>
5979                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
5980                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5981                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5982                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5983                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5984                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5985                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5986                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5987                 </links>
5988         </class>
5989         <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">
5990                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
5991                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5992                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5993                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5994                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
5995                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5996                 </fields>
5997                 <links>
5998                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5999                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6000                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6001                 </links>
6002         </class>
6003         <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">
6004                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6005                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6006                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6007                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6008                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6009                 </fields>
6010                 <links>
6011                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6012                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6013                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6014                 </links>
6015         </class>
6016         <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">
6017                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6018                         <field name="bucket" reporter:datatype="link"/>
6019                         <field name="id" reporter:datatype="id" />
6020                         <field name="target_user" reporter:datatype="link"/>
6021                         <field name="create_time" reporter:datatype="timestamp" />
6022                         <field name="pos" reporter:datatype="int" />
6023                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6024                 </fields>
6025                 <links>
6026                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6027                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6028             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6029                 </links>
6030         </class>
6031         <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">
6032                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6033                         <field name="id" reporter:datatype="id" />
6034                         <field name="item" reporter:datatype="link"/>
6035                         <field name="note" reporter:datatype="text" />
6036                 </fields>
6037                 <links>
6038                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6039                 </links>
6040         </class>
6041         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6042                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6043                         <field name="balance_owed" reporter:datatype="money" />
6044                         <field name="total_owed" reporter:datatype="money" />
6045                         <field name="total_paid" reporter:datatype="money" />
6046                         <field name="usr" reporter:datatype="link"/>
6047                 </fields>
6048                 <links>
6049                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6050                 </links>
6051         </class>
6052         <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">
6053                 <fields oils_persist:primary="code" oils_persist:sequence="">
6054                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6055                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6056                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6057                 </fields>
6058                 <links/>
6059         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6060             <actions>
6061                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6062                 <retrieve/>
6063                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6064                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6065             </actions>
6066         </permacrud>
6067         </class>
6068         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
6069                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6070                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6071                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6072                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6073                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6074                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6075                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6076                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6077                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6078                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6079                 </fields>
6080                 <links>
6081                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6082                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6083                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6084                 </links>
6085         </class>
6086         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
6087                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6088                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6089                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6090                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6091                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6092                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6093                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6094                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6095                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6096                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6097                 </fields>
6098                 <links>
6099                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6100                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6101                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6102                 </links>
6103         </class>
6104         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
6105                 <fields oils_persist:primary="id" oils_persist:sequence="">
6106                         <field name="checkin_lib" reporter:datatype="link"/>
6107                         <field name="checkin_staff" reporter:datatype="link"/>
6108                         <field name="checkin_time" reporter:datatype="timestamp"/>
6109                         <field name="circ_lib"  reporter:datatype="org_unit"/>
6110                         <field name="circ_staff" reporter:datatype="link"/>
6111                         <field name="desk_renewal" reporter:datatype="bool"/>
6112                         <field name="due_date" reporter:datatype="timestamp"/>
6113                         <field name="duration" reporter:datatype="interval"/>
6114                         <field name="duration_rule" reporter:datatype="link"/>
6115                         <field name="fine_interval" reporter:datatype="interval"/>
6116                         <field name="id" reporter:datatype="id" />
6117                         <field name="max_fine" reporter:datatype="money" />
6118                         <field name="max_fine_rule" reporter:datatype="link"/>
6119                         <field name="opac_renewal" reporter:datatype="bool"/>
6120                         <field name="phone_renewal" reporter:datatype="bool"/>
6121                         <field name="recurring_fine" reporter:datatype="money" />
6122                         <field name="recurring_fine_rule" reporter:datatype="link"/>
6123                         <field name="renewal_remaining" reporter:datatype="int" />
6124             <field name="grace_period" reporter:datatype="interval" />
6125                         <field name="stop_fines" reporter:datatype="text"/>
6126                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
6127                         <field name="target_copy" reporter:datatype="link"/>
6128                         <field name="usr" reporter:datatype="link"/>
6129                         <field name="xact_finish" reporter:datatype="timestamp" />
6130                         <field name="xact_start" reporter:datatype="timestamp" />
6131                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6132                 </fields>
6133                 <links>
6134                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6135                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6136                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6137                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6138                 </links>
6139         </class>
6140         <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">
6141                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
6142                         <field name="field" reporter:datatype="link"/>
6143                         <field name="id" reporter:datatype="id" />
6144                         <field name="source" reporter:datatype="link"/>
6145                         <field name="value" reporter:datatype="text"/>
6146                 </fields>
6147                 <links>
6148                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6149                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6150                 </links>
6151         </class>
6152         <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">
6153                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6154                         <field name="high" reporter:datatype="money" />
6155                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6156                         <field name="low" reporter:datatype="money" />
6157                         <field name="name" reporter:datatype="text"/>
6158                         <field name="normal" reporter:datatype="money" />
6159                         <field name="recurrence_interval" reporter:datatype="interval"/>
6160             <field name="grace_period" reporter:datatype="interval" />
6161                 </fields>
6162                 <links/>
6163         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6164             <actions>
6165                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6166                 <retrieve/>
6167                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6168                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6169             </actions>
6170         </permacrud>
6171         </class>
6172         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
6173                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6174                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6175                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6176                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6177                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6178                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6179                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6180                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6181                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6182                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6183                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6184                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6185                 </fields>
6186                 <links>
6187                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6188                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6189                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6190                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6191                 </links>
6192         </class>
6193         <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">
6194                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6195                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6196                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6197                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6198                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6199                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6200                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6201                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6202                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6203                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6204                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6205                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6206                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6207                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6208                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6209                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6210                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6211                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6212                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6213                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6214                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6215                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6216                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6217                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6218                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6219                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6220                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6221                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6222                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6223                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6224                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6225                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6226                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
6227                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6228                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6229                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6230                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6231                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6232                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6233                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6234                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6235                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6236                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6237                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6238                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6239                 </fields>
6240                 <links>
6241                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6242                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6243                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6244                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6245                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6246                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6247                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6248                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6249                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6250                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6251                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6252                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6253                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6254                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6255                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6256                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6257                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6258                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6259                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6260                 </links>
6261         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6262             <actions>
6263                 <create permission="CREATE_COPY">
6264                     <context link="call_number" field="owning_lib"/>
6265                 </create>
6266                 <retrieve/>
6267                 <update permission="UPDATE_COPY">
6268                     <context link="call_number" field="owning_lib"/>
6269                 </update>
6270                 <delete permission="DELETE_COPY">
6271                     <context link="call_number" field="owning_lib"/>
6272                 </delete>
6273             </actions>
6274         </permacrud>
6275         </class>
6276
6277         <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">
6278                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6279                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6280                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6281                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6282                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6283                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6284                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6285                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6286                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6287                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6288                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6289                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6290                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6291                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6292                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6293                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6294                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6295                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6296                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6297                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6298                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6299                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6300                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6301                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6302                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
6303                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6304                 </fields>
6305                 <links>
6306                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6307                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6308                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6309                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6310                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6311                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6312                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6313                 </links>
6314                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6315                         <actions>
6316                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6317                                 <retrieve />
6318                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6319                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6320                         </actions>
6321                 </permacrud>
6322         </class>
6323
6324         <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">
6325                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6326                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6327                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6328                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6329                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6330                 </fields>
6331                 <links/>
6332         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6333             <actions>
6334                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6335                 <retrieve/>
6336                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6337                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6338             </actions>
6339         </permacrud>
6340         </class>
6341         <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">
6342                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6343                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6344                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6345                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6346                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6347                 </fields>
6348                 <links/>
6349         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6350             <actions>
6351                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6352                 <retrieve/>
6353                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6354                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6355             </actions>
6356         </permacrud>
6357         </class>
6358         <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">
6359                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6360                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6361                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6362                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6363                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6364                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6365                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6366                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6367                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6368                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6369                 </fields>
6370                 <links>
6371                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6372                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6373                 </links>
6374         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6375             <actions>
6376                 <create permission="CREATE_PERM" global_required="true"/>
6377                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6378                 <update permission="UPDATE_PERM" global_required="true"/>
6379                 <delete permission="DELETE_PERM" global_required="true"/>
6380             </actions>
6381         </permacrud>
6382         </class>
6383         <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">
6384                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6385                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6386                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6387                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6388                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6389                 </fields>
6390                 <links>
6391                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6392                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6393                 </links>
6394         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6395             <actions>
6396                 <create permission="ADMIN_SURVEY">
6397                     <context link="question" jump="survey" field="owner"/>
6398                 </create>
6399                 <retrieve/>
6400                 <update permission="ADMIN_SURVEY">
6401                     <context link="question" jump="survey" field="owner"/>
6402                 </update>
6403                 <delete permission="ADMIN_SURVEY">
6404                     <context link="question" jump="survey" field="owner"/>
6405                 </delete>
6406             </actions>
6407         </permacrud>
6408         </class>
6409         <class id="ancc" controller="open-ils.cstore" oils_obj:fieldmapper="action::non_cataloged_circulation" oils_persist:tablename="action.non_cataloged_circulation" reporter:core="true" reporter:label="Non-cataloged Circulation">
6410                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6411                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6412                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6413                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6414                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6415                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6416                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6417                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6418                 </fields>
6419                 <links>
6420                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6421                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6422                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6423                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6424                 </links>
6425         </class>
6426         <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">
6427                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6428                         <field name="balance_owed" reporter:datatype="money" />
6429                         <field name="total_owed" reporter:datatype="money" />
6430                         <field name="total_paid" reporter:datatype="money" />
6431                         <field name="usr" reporter:datatype="link"/>
6432                 </fields>
6433                 <links>
6434                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6435                 </links>
6436         </class>
6437         <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">
6438                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
6439                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
6440                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
6441                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
6442                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
6443                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6444                 </fields>
6445                 <links>
6446                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6447                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6448                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6449                 </links>
6450         </class>
6451         <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">
6452                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
6453                         <field name="field" reporter:datatype="link"/>
6454                         <field name="id" reporter:datatype="id" />
6455                         <field name="source" reporter:datatype="link"/>
6456                         <field name="value" reporter:datatype="text"/>
6457                 </fields>
6458                 <links>
6459                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6460                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6461                 </links>
6462         </class>
6463         <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">
6464                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
6465                         <field name="field" reporter:datatype="link"/>
6466                         <field name="id" reporter:datatype="id" />
6467                         <field name="source" reporter:datatype="link"/>
6468                         <field name="value" reporter:datatype="text"/>
6469                 </fields>
6470                 <links>
6471                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6472                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6473                 </links>
6474         </class>
6475         <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">
6476                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
6477                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6478                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
6479                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
6480                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
6481                 </fields>
6482                 <links>
6483                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
6484                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6485                 </links>
6486         </class>
6487         <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">
6488                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
6489                         <field name="depth" reporter:datatype="int" />
6490                         <field name="grantable" reporter:datatype="bool"/>
6491                         <field name="grp" reporter:datatype="link"/>
6492                         <field name="id" reporter:datatype="id" />
6493                         <field name="perm" reporter:datatype="link"/>
6494                 </fields>
6495                 <links>
6496                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6497                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6498                 </links>
6499         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6500             <actions>
6501                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
6502                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
6503                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
6504                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
6505             </actions>
6506         </permacrud>
6507         </class>
6508         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
6509                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
6510                         <field name="items" oils_persist:virtual="true" />
6511                         <field name="btype" reporter:datatype="text"/>
6512                         <field name="id" reporter:datatype="id" />
6513                         <field name="name" reporter:datatype="text"/>
6514                         <field name="description" reporter:datatype="text"/>
6515                         <field name="owner" reporter:datatype="link"/>
6516                         <field name="pub" reporter:datatype="bool"/>
6517                         <field name="create_time" reporter:datatype="timestamp" />
6518                 </fields>
6519                 <links>
6520                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6521                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
6522                 </links>
6523         </class>
6524         <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">
6525                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
6526                         <field name="id" reporter:datatype="id" />
6527                         <field name="bucket" reporter:datatype="link"/>
6528                         <field name="note" reporter:datatype="text" />
6529                 </fields>
6530                 <links>
6531                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
6532                 </links>
6533         </class>
6534         <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">
6535                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
6536                         <field name="id" reporter:datatype="int" />
6537                         <field name="usr" reporter:datatype="link"/>
6538                         <field name="work_ou" reporter:datatype="link"/>
6539                 </fields>
6540                 <links>
6541                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6542                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
6543                 </links>
6544         </class>
6545         <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">
6546                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
6547                         <field name="depth" reporter:datatype="int"/>
6548                         <field name="grantable" reporter:datatype="bool"/>
6549                         <field name="id" reporter:datatype="id" />
6550                         <field name="perm" reporter:datatype="link"/>
6551                         <field name="usr" reporter:datatype="link"/>
6552                 </fields>
6553                 <links>
6554                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6555                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6556                 </links>
6557         </class>
6558         <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">
6559                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
6560                         <field name="object_id" reporter:datatype="text"/>
6561                         <field name="grantable" reporter:datatype="bool"/>
6562                         <field name="id" reporter:datatype="id" />
6563                         <field name="perm" reporter:datatype="link"/>
6564                         <field name="usr" reporter:datatype="link"/>
6565                         <field name="object_type" reporter:datatype="text"/>
6566                 </fields>
6567                 <links>
6568                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6569                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6570                 </links>
6571         </class>
6572         <class id="mp" controller="open-ils.cstore" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:core="true" reporter:label="Payments: All">
6573                 <fields oils_persist:primary="id" oils_persist:sequence="">
6574                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6575                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6576                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6577                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6578                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6579                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6580                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6581                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6582                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6583                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6584                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6585                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6586                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6587                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6588                 </fields>
6589                 <links>
6590                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6591                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6592                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6593                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6594                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6595                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6596                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6597                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6598                 </links>
6599         </class>
6600         <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">
6601                 <fields oils_persist:primary="id" oils_persist:sequence="">
6602                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6603                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6604                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6605                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6606                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6607                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6608                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
6609                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6610                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6611                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6612                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6613                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6614                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6615                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6616                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6617                 </fields>
6618                 <links>
6619                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6620                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6621                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6622                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6623                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6624                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6625                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6626                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6627                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6628                 </links>
6629         </class>
6630         <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">
6631                 <fields oils_persist:primary="id" oils_persist:sequence="">
6632                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6633                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6634                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6635                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6636                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6637                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6638                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6639                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6640                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6641                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6642                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6643                 </fields>
6644                 <links>
6645                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6646                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6647                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6648                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6649                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6650                 </links>
6651         </class>
6652         <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">
6653                 <fields oils_persist:primary="id" oils_persist:sequence="">
6654                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6655                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6656                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6657                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6658                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6659                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6660                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
6661                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
6662                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6663                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6664                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6665                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6666                 </fields>
6667                 <links>
6668                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6669                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6670                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6671                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6672                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6673                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6674                 </links>
6675         </class>
6676         <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">
6677                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
6678                         <field name="bucket" reporter:datatype="link"/>
6679                         <field name="id" reporter:datatype="id" />
6680                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
6681                         <field name="create_time" reporter:datatype="timestamp" />
6682                         <field name="pos" reporter:datatype="int" />
6683                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6684                 </fields>
6685                 <links>
6686                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
6687                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
6688             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
6689                 </links>
6690         </class>
6691         <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">
6692                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
6693                         <field name="id" reporter:datatype="id" />
6694                         <field name="item" reporter:datatype="link"/>
6695                         <field name="note" reporter:datatype="text" />
6696                 </fields>
6697                 <links>
6698                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
6699                 </links>
6700         </class>
6701         <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">
6702                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
6703                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
6704                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6705                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6706                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6707                 </fields>
6708                 <links>
6709                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6710                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6711                 </links>
6712         </class>
6713     <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">
6714         <fields oils_persist:primary="field">
6715             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6716             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6717             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6718         </fields>
6719         <links/>
6720         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6721             <actions>
6722                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
6723                 <retrieve />
6724                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
6725                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
6726             </actions>
6727         </permacrud>
6728     </class>
6729         <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">
6730                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
6731                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
6732                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6733                 </fields>
6734                 <links/>
6735         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6736             <actions>
6737                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6738                 <retrieve/>
6739                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6740                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6741             </actions>
6742         </permacrud>
6743         </class>
6744
6745
6746         <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">
6747                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6748                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6749                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6750                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6751                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
6752                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6753                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6754                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6755                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6756                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6757                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6758                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6759                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6760                 </fields>
6761                 <links>
6762                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6763                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
6764                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6765                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6766                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6767                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6768                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
6769                 </links>
6770         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6771             <actions>
6772                 <create permission="TRANSIT_COPY">
6773                     <context link="target_copy" field="owner"/>
6774                 </create>
6775                 <retrieve/>
6776                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6777                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6778             </actions>
6779         </permacrud>
6780         </class>
6781         <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">
6782                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6783                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6784                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6785                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6786                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
6787                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6788                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6789                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6790                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6791                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6792                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6793                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6794                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6795                 </fields>
6796                 <links>
6797                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6798                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6799                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6800                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6801                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6802                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6803                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6804                 </links>
6805         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6806             <actions>
6807                 <create permission="TRANSIT_COPY" context_field="owner">
6808                     <context link="target_copy" field="circ_lib"/>
6809                 </create>
6810                 <retrieve/>
6811                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6812                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6813             </actions>
6814         </permacrud>
6815         </class>
6816         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
6817                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
6818                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6819                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
6820                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
6821                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
6822                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6823                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
6824                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6825                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
6826                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6827                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
6828                 </fields>
6829                 <links>
6830                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6831                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
6832                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
6833                 </links>
6834         </class>
6835         <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">
6836                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
6837                         <field name="grp" />
6838                         <field name="id" reporter:datatype="id" />
6839                         <field name="usr" />
6840                 </fields>
6841                 <links>
6842                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6843                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6844                 </links>
6845         </class>
6846         <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">
6847                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
6848                         <field name="id" reporter:datatype="id" />
6849                         <field name="fq_field" reporter:datatype="text"/>
6850                         <field name="identity_value" reporter:datatype="text"/>
6851                         <field name="translation" reporter:datatype="text"/>
6852                         <field name="string" reporter:datatype="text"/>
6853                 </fields>
6854                 <links>
6855                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
6856                 </links>
6857         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6858             <actions>
6859                 <create permission="CREATE_TRANSLATION" global_required="true"/>
6860                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
6861                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
6862                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
6863             </actions>
6864         </permacrud>
6865         </class>
6866         <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">
6867                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
6868                         <field name="id" reporter:datatype="id" />
6869                         <field name="fm_class" reporter:datatype="text"/>
6870                         <field name="field" reporter:datatype="text"/>
6871                         <field name="owner" reporter:datatype="org_unit"/>
6872                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
6873                 </fields>
6874                 <links>
6875                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6876                 </links>
6877         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6878             <actions>
6879                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6880                 <retrieve/>
6881                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6882                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6883             </actions>
6884         </permacrud>
6885         </class>
6886         <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">
6887                 <fields oils_persist:primary="code">
6888                         <field name="code" reporter:datatype="id" />
6889                         <field name="marc_code" reporter:datatype="text"/>
6890                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6891                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6892                 </fields>
6893                 <links/>
6894         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6895             <actions>
6896                 <create permission="CREATE_LOCALE" global_required="true"/>
6897                 <retrieve/>
6898                 <update permission="UPDATE_LOCALE" global_required="true"/>
6899                 <delete permission="DELETE_LOCALE" global_required="true"/>
6900             </actions>
6901         </permacrud>
6902         </class>
6903         <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">
6904                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
6905                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
6906                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
6907                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
6908             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
6909                 </fields>
6910                 <links>
6911                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6912                 </links>
6913         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6914             <actions>
6915                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
6916                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
6917                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
6918                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
6919             </actions>
6920         </permacrud>
6921         </class>
6922
6923         <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">
6924                 <fields oils_persist:primary="id">
6925                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6926                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6927                 </fields>
6928                 <links/>
6929         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6930             <actions>
6931                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6932                 <retrieve/>
6933                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6934                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6935             </actions>
6936         </permacrud>
6937         </class>
6938
6939         <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">
6940                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
6941                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6942                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6943                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
6944                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
6945                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
6946                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
6947                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
6948                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
6949                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6950                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
6951                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
6952                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
6953                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
6954                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
6955                         <field reporter:label="Title" name="title" reporter:datatype="text" />
6956                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
6957                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6958                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
6959                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
6960                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
6961                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
6962                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
6963                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
6964                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
6965                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6966                 </fields>
6967                 <links>
6968                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6969                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6970                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6971                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
6972                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
6973                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6974                 </links>
6975         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6976             <actions>
6977                 <create permission="user_request.create">
6978                     <context link="usr" field="home_ou"/>
6979                                 </create>
6980                 <retrieve permission="user_request.view">
6981                     <context link="usr" field="home_ou"/>
6982                                 </retrieve>
6983                 <update permission="user_request.update">
6984                     <context link="usr" field="home_ou"/>
6985                                 </update>
6986                 <delete permission="user_request.delete">
6987                     <context link="usr" field="home_ou"/>
6988                                 </delete>
6989             </actions>
6990         </permacrud>
6991         </class>
6992
6993         <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">
6994                 <fields oils_persist:primary="code">
6995                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
6996                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6997                 </fields>
6998                 <links/>
6999         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7000             <actions>
7001                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7002                 <retrieve/>
7003                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7004                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7005             </actions>
7006         </permacrud>
7007         </class>
7008
7009         <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">
7010                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
7011                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
7012                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
7013                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
7014                         <field reporter:label="Ratio" name="ratio" />
7015                 </fields>
7016                 <links>
7017                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
7018                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
7019                 </links>
7020                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7021                         <actions>
7022                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7023                                 <retrieve/>
7024                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7025                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7026                         </actions>
7027                 </permacrud>
7028         </class>
7029
7030         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
7031                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
7032                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7033                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7034                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7035                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7036                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7037                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
7038                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
7039                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
7040                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
7041                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7042                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7043                         <field reporter:label="URL" name="url" reporter:datatype="text" />
7044                         <field reporter:label="Email" name="email" reporter:datatype="text" />
7045                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
7046                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
7047                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
7048                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
7049                 </fields>
7050                 <links>
7051                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7052                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7053             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
7054             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
7055             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
7056                 </links>
7057         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7058             <actions>
7059                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
7060                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
7061                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
7062                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
7063             </actions>
7064         </permacrud>
7065         </class>
7066
7067         <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">
7068                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
7069                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7070                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7071                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7072                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7073                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7074                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7075                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7076                 </fields>
7077                 <links>
7078                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7079                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7080                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7081                 </links>
7082         </class>
7083
7084         <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">
7085                 <fields oils_persist:primary="code">
7086                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
7087                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7088                 </fields>
7089                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7090             <actions>
7091                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7092                 <retrieve/>
7093                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7094                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7095             </actions>
7096                 </permacrud>
7097         </class>
7098
7099         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
7100                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
7101                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
7102                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
7103                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7104                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
7105                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
7106                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
7107                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
7108                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
7109                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
7110                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
7111                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7112                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
7113                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
7114                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
7115                 </fields>
7116                 <links>
7117                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
7118                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7119                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
7120                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
7121                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
7122                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
7123                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
7124                 </links>
7125         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7126             <actions>
7127                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
7128                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
7129                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
7130                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
7131             </actions>
7132         </permacrud>
7133         </class>
7134
7135         <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">
7136                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
7137                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7138                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7139                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7140                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
7141                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
7142                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
7143                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7144                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
7145                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7146                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7147                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7148                 </fields>
7149                 <links>
7150                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7151                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7152                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7153                 </links>
7154         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7155             <actions>
7156                 <create   permission="ADMIN_INVOICE">
7157                                         <context link="invoice" field="receiver"/>
7158                                 </create>
7159                 <retrieve permission="ADMIN_INVOICE">
7160                                         <context link="invoice" field="receiver"/>
7161                                 </retrieve>
7162                 <update   permission="ADMIN_INVOICE">
7163                                         <context link="invoice" field="receiver"/>
7164                                 </update>
7165                                 <delete   permission="ADMIN_INVOICE">
7166                                         <context link="invoice" field="receiver"/>
7167                                 </delete>
7168             </actions>
7169         </permacrud>
7170         </class>
7171
7172         <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">
7173                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
7174                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7175                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7176                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7177                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7178                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7179                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7180                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7181                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7182                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7183                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7184                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7185                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7186                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7187                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7188                 </fields>
7189                 <links>
7190                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7191                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7192                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7193                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7194                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7195                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
7196                 </links>
7197         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7198             <actions>
7199                 <create   permission="ADMIN_INVOICE">
7200                                         <context link="invoice" field="receiver"/>
7201                                 </create>
7202                 <retrieve permission="ADMIN_INVOICE">
7203                                         <context link="invoice" field="receiver"/>
7204                                 </retrieve>
7205                 <update   permission="ADMIN_INVOICE">
7206                                         <context link="invoice" field="receiver"/>
7207                                 </update>
7208                                 <delete   permission="ADMIN_INVOICE">
7209                                         <context link="invoice" field="receiver"/>
7210                                 </delete>
7211             </actions>
7212         </permacrud>
7213         </class>
7214
7215         <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">
7216                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7217                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7218                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7219                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7220                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7221                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7222                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7223                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7224                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7225                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7226                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7227                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7228                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7229                 </fields>
7230                 <links>
7231                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7232                 </links>
7233         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7234             <actions>
7235                 <create permission="ADMIN_PROVIDER">
7236                     <context link="provider" field="owner"/>
7237                 </create>
7238                 <retrieve permission="ADMIN_PROVIDER">
7239                     <context link="provider" field="owner"/>
7240                 </retrieve>
7241                 <update permission="ADMIN_PROVIDER">
7242                     <context link="provider" field="owner"/>
7243                 </update>
7244                 <delete permission="ADMIN_PROVIDER">
7245                     <context link="provider" field="owner"/>
7246                 </delete>
7247             </actions>
7248         </permacrud>
7249         </class>
7250
7251         <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">
7252                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7253                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7254                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7255                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7256                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7257                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7258                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7259         </fields>
7260                 <links>
7261                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7262                 </links>
7263         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7264             <actions>
7265                 <create permission="ADMIN_PROVIDER">
7266                     <context link="provider" field="owner"/>
7267                 </create>
7268                 <retrieve permission="ADMIN_PROVIDER">
7269                     <context link="provider" field="owner"/>
7270                 </retrieve>
7271                 <update permission="ADMIN_PROVIDER">
7272                     <context link="provider" field="owner"/>
7273                 </update>
7274                 <delete permission="ADMIN_PROVIDER">
7275                     <context link="provider" field="owner"/>
7276                 </delete>
7277             </actions>
7278         </permacrud>
7279     </class>
7280         <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">
7281                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7282                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7283                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7284                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7285                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7286                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7287                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7288                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7289                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7290                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7291                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7292                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7293                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7294                 </fields>
7295                 <links>
7296                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7297                 </links>
7298         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7299             <actions>
7300                 <create permission="ADMIN_PROVIDER">
7301                     <context link="contact" jump='provider' field="owner"/>
7302                 </create>
7303                 <retrieve permission="ADMIN_PROVIDER">
7304                     <context link="contact" jump='provider' field="owner"/>
7305                 </retrieve>
7306                 <update permission="ADMIN_PROVIDER">
7307                     <context link="contact" jump='provider' field="owner"/>
7308                 </update>
7309                 <delete permission="ADMIN_PROVIDER">
7310                     <context link="contact" jump='provider' field="owner"/>
7311                 </delete>
7312             </actions>
7313         </permacrud>
7314         </class>
7315
7316         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7317                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7318                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7319                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7320                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7321                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7322                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7323                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7324                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7325                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7326                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7327                 </fields>
7328                 <links>
7329                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7330                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7331                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7332                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7333                 </links>
7334         </class>
7335
7336         <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">
7337                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7338                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7339                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7340                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7341                 </fields>
7342                 <links>
7343             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7344                 </links>
7345                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7346                         <actions>
7347                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7348                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7349                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7350                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7351                         </actions>
7352                 </permacrud>
7353         </class>
7354
7355         <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">
7356                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7357                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7358                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7359                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7360                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7361                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7362                 </fields>
7363                 <links>
7364                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7365                 </links>
7366                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7367                         <actions>
7368                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7369                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7370                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7371                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7372                         </actions>
7373                 </permacrud>
7374         </class>
7375
7376         <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">
7377                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7378                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7379                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7380                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7381                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7382                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7383                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7384                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7385                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7386                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7387                 </fields>
7388                 <links>
7389                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7390                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7391             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7392             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7393                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7394                 </links>
7395         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7396             <actions>
7397                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7398                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7399                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7400                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7401             </actions>
7402         </permacrud>
7403         </class>
7404
7405         <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">
7406                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
7407                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
7408                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
7409                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7410                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7411                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
7412                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
7413                 </fields>
7414                 <links>
7415                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7416                 </links>
7417                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7418                         <actions>
7419                                 <create permission="ADMIN_FUNDING_SOURCE">
7420                     <context link="funding_source" field="owner"/>
7421                 </create>
7422                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
7423                     <context link="funding_source" field="owner"/>
7424                 </retrieve>
7425                                 <update permission="ADMIN_FUNDING_SOURCE">
7426                     <context link="funding_source" field="owner"/>
7427                 </update>
7428                                 <delete permission="ADMIN_FUNDING_SOURCE">
7429                     <context link="funding_source" field="owner"/>
7430                 </delete>
7431                         </actions>
7432                 </permacrud>
7433         </class>
7434
7435         <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">
7436                 <fields oils_persist:primary="id">
7437                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
7438                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
7439                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
7440                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
7441                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
7442                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7443                 </fields>
7444                 <links>
7445                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7446                 </links>
7447         </class>
7448
7449         <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">
7450                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
7451                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
7452                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7453                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
7454                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
7455                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7456                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
7457                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
7458                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7459                 </fields>
7460                 <links>
7461                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7462                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7463                 </links>
7464                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7465                         <actions>
7466                                 <create permission="ADMIN_ACQ_FUND">
7467                     <context link="fund" field="org"/>
7468                 </create>
7469                                 <retrieve permission="ADMIN_ACQ_FUND">
7470                     <context link="fund" field="org"/>
7471                 </retrieve>
7472                                 <update permission="ADMIN_ACQ_FUND">
7473                     <context link="fund" field="org"/>
7474                 </update>
7475                                 <delete permission="ADMIN_ACQ_FUND">
7476                     <context link="fund" field="org"/>
7477                 </delete>
7478                         </actions>
7479                 </permacrud>
7480         </class>
7481
7482         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
7483                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7484                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7485                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7486                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7487                         <field reporter:label="Year" name="year" reporter:datatype="int" />
7488                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7489                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7490                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7491                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7492                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7493                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7494                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7495                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7496                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7497                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
7498                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7499                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
7500                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
7501                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
7502                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
7503                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7504                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7505                 </fields>
7506                 <links>
7507                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7508                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7509             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
7510             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
7511             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
7512             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
7513             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
7514             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
7515             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
7516             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
7517             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
7518                 </links>
7519         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7520             <actions>
7521                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
7522                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7523                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
7524                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
7525             </actions>
7526         </permacrud>
7527         </class>
7528
7529         <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">
7530                 <fields oils_persist:primary="fund">
7531                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7532                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7533                 </fields>
7534                 <links>
7535                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7536                 </links>
7537         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7538             <actions>
7539                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7540                                         <context link="fund" field="org" />
7541                 </retrieve>
7542             </actions>
7543         </permacrud>
7544         </class>
7545
7546         <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">
7547                 <fields oils_persist:primary="fund">
7548                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7549                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
7550                 </fields>
7551                 <links>
7552                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7553                 </links>
7554         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7555             <actions>
7556                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7557                                         <context link="fund" field="org" />
7558                 </retrieve>
7559             </actions>
7560         </permacrud>
7561         </class>
7562
7563         <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">
7564                 <fields oils_persist:primary="fund">
7565                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7566                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
7567                 </fields>
7568                 <links>
7569                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7570                 </links>
7571         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7572             <actions>
7573                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7574                                         <context link="fund" field="org" />
7575                 </retrieve>
7576             </actions>
7577         </permacrud>
7578         </class>
7579
7580         <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">
7581                 <fields oils_persist:primary="fund">
7582                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7583                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7584                 </fields>
7585                 <links>
7586                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7587                 </links>
7588         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7589             <actions>
7590                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7591                                         <context link="fund" field="org" />
7592                 </retrieve>
7593             </actions>
7594         </permacrud>
7595         </class>
7596
7597         <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">
7598                 <fields oils_persist:primary="fund">
7599                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7600                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
7601                 </fields>
7602                 <links>
7603                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7604                 </links>
7605         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7606             <actions>
7607                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7608                                         <context link="fund" field="org" />
7609                 </retrieve>
7610             </actions>
7611         </permacrud>
7612         </class>
7613
7614    <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">
7615         <fields oils_persist:primary="fund">
7616             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7617             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7618         </fields>
7619         <links>
7620             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7621         </links>
7622     </class>
7623
7624    <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">
7625         <fields oils_persist:primary="fund">
7626             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7627             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
7628         </fields>
7629         <links>
7630             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7631         </links>
7632     </class>
7633
7634    <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">
7635         <fields oils_persist:primary="fund">
7636             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7637             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7638         </fields>
7639         <links>
7640             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7641         </links>
7642     </class>
7643
7644    <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">
7645         <fields oils_persist:primary="fund">
7646             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7647             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
7648         </fields>
7649         <links>
7650             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7651         </links>
7652     </class>
7653
7654    <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">
7655         <fields oils_persist:primary="fund">
7656             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7657             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
7658         </fields>
7659         <links>
7660             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7661         </links>
7662     </class>
7663
7664         <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">
7665                 <fields oils_persist:primary="funding_source">
7666                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7667                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
7668                 </fields>
7669                 <links>
7670                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7671                 </links>
7672         </class>
7673
7674         <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">
7675                 <fields oils_persist:primary="funding_source">
7676                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7677                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
7678                 </fields>
7679                 <links>
7680                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7681                 </links>
7682         </class>
7683
7684         <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">
7685                 <fields oils_persist:primary="funding_source">
7686                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7687                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
7688                 </fields>
7689                 <links>
7690                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7691                 </links>
7692         </class>
7693
7694         <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">
7695                 <fields oils_persist:primary="fund">
7696                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7697                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
7698                 </fields>
7699                 <links>
7700                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7701                 </links>
7702         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7703             <actions>
7704                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7705                                         <context link="fund" field="org" />
7706                 </retrieve>
7707             </actions>
7708         </permacrud>
7709     </class>
7710     <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">
7711         <oils_persist:source_definition><![CDATA[
7712             SELECT
7713                 acqf.*,
7714                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
7715                 COALESCE(acqfst.amount, 0.00) AS spent_total,
7716                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
7717                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
7718             FROM
7719                 acq.fund acqf
7720                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
7721                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
7722                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
7723                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
7724         ]]></oils_persist:source_definition>
7725         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7726             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7727             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7728             <field reporter:label="Name" name="name" reporter:datatype="text" />
7729             <field reporter:label="Year" name="year" reporter:datatype="int" />
7730             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7731             <field reporter:label="Code" name="code" reporter:datatype="text" />
7732             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7733             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7734             <field reporter:label="Active" name="active" reporter:datatype="bool" />
7735             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7736             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7737
7738             <!-- non fund-native fields -->
7739             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
7740             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
7741             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
7742             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
7743         </fields>
7744         <links>
7745             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
7746             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7747             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7748         </links>
7749         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7750             <actions>
7751                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7752             </actions>
7753         </permacrud>
7754         </class>
7755         <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">
7756                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
7757                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7758                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7759                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7760                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7761                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7762                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7763                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7764                 </fields>
7765                 <links>
7766                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7767                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7768                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7769                 </links>
7770                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7771                         <actions>
7772                                 <create permission="ADMIN_ACQ_FUND">
7773                     <context link="fund" field="org"/>
7774                 </create>
7775                                 <retrieve permission="ADMIN_ACQ_FUND">
7776                     <context link="fund" field="org"/>
7777                 </retrieve>
7778                                 <update permission="ADMIN_ACQ_FUND">
7779                     <context link="fund" field="org"/>
7780                 </update>
7781                                 <delete permission="ADMIN_ACQ_FUND">
7782                     <context link="fund" field="org"/>
7783                 </delete>
7784                         </actions>
7785                 </permacrud>
7786         </class>
7787
7788     <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">
7789         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
7790             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7791             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7792             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7793             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
7794             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
7795             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7796             <field reporter:label="Note" name="note" reporter:datatype="text" />
7797             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7798         </fields>
7799         <links>
7800             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7801             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7802             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7803         </links>
7804                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7805                         <actions>
7806                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7807                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7808                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7809                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7810                         </actions>
7811                 </permacrud>
7812     </class>
7813
7814         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
7815                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
7816                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
7817                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7818                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
7819                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7820                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7821                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7822                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
7823                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
7824                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7825                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7826                 </fields>
7827                 <links>
7828                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7829                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7830                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7831                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7832                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
7833                 </links>
7834                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7835                         <actions>
7836                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
7837                         </actions>
7838                 </permacrud>
7839         </class>
7840
7841         <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">
7842                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
7843                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7844                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
7845                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7846                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7847                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
7848                 </fields>
7849                 <links>
7850                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7851                 </links>
7852                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7853                         <actions>
7854                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7855                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
7856                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7857                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7858                         </actions>
7859                 </permacrud>
7860         </class>
7861
7862         <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">
7863                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
7864                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7865                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7866                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7867                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7868                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7869                         <field reporter:label="State" name="state" reporter:datatype="text" />
7870                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
7871                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7872                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7873                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
7874                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7875                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7876                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7877                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
7878                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7879                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
7880                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
7881                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
7882                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
7883                 </fields>
7884                 <links>
7885                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7886                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7887                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7888                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
7889                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7890                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
7891                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
7892                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
7893                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7894                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7895                 </links>
7896                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7897                         <actions>
7898                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7899                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7900                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7901                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7902                         </actions>
7903                 </permacrud>
7904         </class>
7905
7906         <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">
7907                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
7908                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7909                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7910                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7911                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
7912                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7913                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7914                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7915                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
7916                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7917                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7918                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7919                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7920                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
7921                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7922                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7923                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7924                 </fields>
7925                 <links>
7926                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
7927                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7928                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7929                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7930                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7931                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7932                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7933                 </links>
7934                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7935             <actions>
7936                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7937             </actions>
7938                 </permacrud>
7939         </class>
7940
7941         <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">
7942                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
7943                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7944                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7945                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7946                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7947                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7948                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7949                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
7950                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7951                 </fields>
7952                 <links>
7953                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7954                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7955                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7956                 </links>
7957                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7958             <actions>
7959                 <create permission="CREATE_PURCHASE_ORDER">
7960                     <context link="purchase_order" field="ordering_agency"/>
7961                 </create>
7962                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7963                     <context link="purchase_order" field="ordering_agency"/>
7964                 </retrieve>
7965                 <update permission="CREATE_PURCHASE_ORDER">
7966                     <context link="purchase_order" field="ordering_agency"/>
7967                 </update>
7968                 <delete permission="CREATE_PURCHASE_ORDER">
7969                     <context link="purchase_order" field="ordering_agency"/>
7970                 </delete>
7971             </actions>
7972                 </permacrud>
7973         </class>
7974
7975         <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">
7976                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
7977                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7978                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7979                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7980                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
7981                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
7982                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
7983                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7984                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
7985                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
7986                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7987                 </fields>
7988                 <links>
7989                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7990                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7991                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7992                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7993                 </links>
7994                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7995             <actions>
7996                 <create permission="CREATE_PURCHASE_ORDER">
7997                     <context link="purchase_order" field="ordering_agency"/>
7998                 </create>
7999                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8000                     <context link="purchase_order" field="ordering_agency"/>
8001                 </retrieve>
8002                 <update permission="CREATE_PURCHASE_ORDER">
8003                     <context link="purchase_order" field="ordering_agency"/>
8004                 </update>
8005                 <delete permission="CREATE_PURCHASE_ORDER">
8006                     <context link="purchase_order" field="ordering_agency"/>
8007                 </delete>
8008             </actions>
8009                 </permacrud>
8010         </class>
8011
8012         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
8013                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
8014                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
8015                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
8016                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
8017                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8018                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8019                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8020                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8021                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
8022                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
8023                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
8024                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
8025                         <field reporter:label="State" name="state" reporter:datatype="text" />
8026                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8027                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8028                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
8029                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8030                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8031                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8032                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
8033                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
8034                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
8035                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
8036                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
8037                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
8038                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
8039                 </fields>
8040                 <links>
8041                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8042                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8043                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8044                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8045                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8046                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8047                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8048                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
8049                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
8050                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
8051                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8052                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
8053                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8054                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
8055                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
8056                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8057                 </links>
8058                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8059                         <actions>
8060                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
8061                                         <context link="purchase_order" field="ordering_agency"/>
8062                                         <context link="picklist" field="org_unit"/>
8063                                 </retrieve>
8064                         </actions>
8065                 </permacrud>
8066         </class>
8067
8068         <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">
8069                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
8070                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8071                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8072                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8073                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
8074                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8075                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8076                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
8077                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8078                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8079                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
8080                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
8081                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8082                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8083                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
8084                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
8085                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
8086                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8087                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
8088                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8089                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8090                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8091                 </fields>
8092                 <links>
8093                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
8094                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8095                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8096                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8097                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8098                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8099                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8100                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8101                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8102                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8103                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8104                 </links>
8105                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8106                         <actions>
8107                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8108                                         <context link="purchase_order" field="ordering_agency"/>
8109                                         <context link="picklist" field="org_unit"/>
8110                                 </retrieve>
8111                         </actions>
8112                 </permacrud>
8113         </class>
8114
8115         <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">
8116                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
8117                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
8118                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8119                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8120                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8121                 </fields>
8122                 <links>
8123                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8124                 </links>
8125                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8126                         <actions>
8127                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8128                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
8129                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8130                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8131                         </actions>
8132                 </permacrud>
8133         </class>
8134
8135         <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">
8136                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
8137                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
8138                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
8139                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8140                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8141                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8142                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8143                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8144                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
8145                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8146                 </fields>
8147                 <links>
8148                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8149                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8150                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8151                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
8152                 </links>
8153         </class>
8154
8155         <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">
8156                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
8157                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
8158                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
8159                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
8160                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
8161                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
8162                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
8163                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
8164                 </fields>
8165                 <links>
8166                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8167                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
8168                 </links>
8169         </class>
8170
8171         <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">
8172                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
8173                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
8174                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8175                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8176                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8177                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8178                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8179                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8180                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8181                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8182                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8183                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8184                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8185                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8186                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8187                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8188                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
8189                 </fields>
8190                 <links>
8191                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8192                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
8193                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8194                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8195                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8196                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8197                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8198                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8199                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
8200                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
8201                 </links>
8202         </class>
8203
8204         <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">
8205                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8206                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8207                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8208                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8209                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8210                 </fields>
8211                 <links/>
8212                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8213                         <actions>
8214                                 <retrieve />
8215                         </actions>
8216                 </permacrud>
8217         </class>
8218
8219         <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">
8220                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8221                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8222                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8223                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8224                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8225                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8226             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8227                 </fields>
8228                 <links/>
8229         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8230             <actions>
8231                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8232                 <retrieve />
8233                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8234                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8235             </actions>
8236         </permacrud>
8237         </class>
8238
8239         <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">
8240                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8241                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8242                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8243                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8244                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8245                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8246                 </fields>
8247                 <links/>
8248         </class>
8249         <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">
8250                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8251                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8252                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8253                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8254                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8255                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8256                 </fields>
8257                 <links>
8258                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8259                 </links>
8260         </class>
8261
8262         <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">
8263             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8264                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8265                 <field reporter:label="Code" name="code" reporter:datatype="text" />
8266                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8267                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8268                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8269                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8270         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8271
8272             </fields>
8273             <links>
8274                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8275             </links>
8276             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8277                 <actions>
8278                     <create permission="ADMIN_PROVIDER">
8279                         <context link="provider" field="owner"/>
8280                     </create>
8281                     <retrieve permission="ADMIN_PROVIDER">
8282                         <context link="provider" field="owner"/>
8283                     </retrieve>
8284                     <update permission="ADMIN_PROVIDER">
8285                         <context link="provider" field="owner"/>
8286                     </update>
8287                     <delete permission="ADMIN_PROVIDER">
8288                         <context link="provider" field="owner"/>
8289                     </delete>
8290                 </actions>
8291             </permacrud>
8292         </class>
8293         
8294         <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">
8295             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8296                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8297                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8298                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8299                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8300             </fields>
8301             <links>
8302                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8303             </links>
8304             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8305                 <actions>
8306                     <create permission="ADMIN_PROVIDER">
8307                         <context link="provider" field="owner"/>
8308                     </create>
8309                     <retrieve permission="ADMIN_PROVIDER">
8310                         <context link="provider" field="owner"/>
8311                     </retrieve>
8312                     <update permission="ADMIN_PROVIDER">
8313                         <context link="provider" field="owner"/>
8314                     </update>
8315                     <delete permission="ADMIN_PROVIDER">
8316                         <context link="provider" field="owner"/>
8317                     </delete>
8318                 </actions>
8319             </permacrud>
8320         </class>
8321         
8322         <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">
8323             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8324                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8325                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8326                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8327                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8328                 </fields>
8329                 <links/>
8330         </class>
8331
8332         <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">
8333                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8334                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8335                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8336                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8337                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8338                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8339                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8340                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8341                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8342                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8343                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8344                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8345                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8346                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8347                 </fields>
8348                 <links>
8349                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8350                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8351                 </links>
8352         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8353             <actions>
8354                 <create permission="ADMIN_PROVIDER">
8355                     <context link="provider" field="owner"/>
8356                 </create>
8357                 <retrieve permission="ADMIN_PROVIDER">
8358                     <context link="provider" field="owner"/>
8359                 </retrieve>
8360                 <update permission="ADMIN_PROVIDER">
8361                     <context link="provider" field="owner"/>
8362                 </update>
8363                 <delete permission="ADMIN_PROVIDER">
8364                     <context link="provider" field="owner"/>
8365                 </delete>
8366             </actions>
8367         </permacrud>
8368         </class>
8369
8370         <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">
8371                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8372                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8373                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8374                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8375                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8376                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8377                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8378                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8379                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8380                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8381                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8382                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8383                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8384                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8385                 </fields>
8386                 <links>
8387                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8388                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8389                 </links>
8390         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8391             <actions>
8392                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8393                     <context link="account" jump="provider" field="owner"/>
8394                 </retrieve>
8395                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8396                     <context link="account" jump="provider" field="owner"/>
8397                 </update>
8398                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8399                     <context link="account" jump="provider" field="owner"/>
8400                 </delete>
8401             </actions>
8402         </permacrud>
8403         </class>
8404
8405
8406         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
8407                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
8408                         <field name="id" reporter:datatype="id" />
8409                         <field name="parent" reporter:datatype="link"/>
8410                         <field name="owner" reporter:datatype="link"/>
8411                         <field name="create_time" reporter:datatype="timestamp"/>
8412                         <field name="name" reporter:datatype="text"/>
8413                         <field name="shared" reporter:datatype="bool"/>
8414                         <field name="share_with" reporter:datatype="link"/>
8415                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8416                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
8417                 </fields>
8418                 <links>
8419                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8420                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
8421                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
8422                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8423                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
8424                 </links>
8425         </class>
8426         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
8427                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
8428                         <field name="id" reporter:datatype="id" />
8429                         <field name="parent" reporter:datatype="link"/>
8430                         <field name="owner" reporter:datatype="link"/>
8431                         <field name="create_time" reporter:datatype="timestamp"/>
8432                         <field name="name" reporter:datatype="text"/>
8433                         <field name="shared" reporter:datatype="bool"/>
8434                         <field name="share_with" reporter:datatype="link"/>
8435                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8436                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
8437                 </fields>
8438                 <links>
8439                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8440                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
8441                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
8442                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8443                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
8444                 </links>
8445         </class>
8446         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
8447                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
8448                         <field name="id" reporter:datatype="id" />
8449                         <field name="parent" reporter:datatype="link"/>
8450                         <field name="owner" reporter:datatype="link"/>
8451                         <field name="create_time" reporter:datatype="timestamp"/>
8452                         <field name="name" reporter:datatype="text"/>
8453                         <field name="shared" reporter:datatype="bool"/>
8454                         <field name="share_with" reporter:datatype="link"/>
8455                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8456                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8457                 </fields>
8458                 <links>
8459                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8460                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
8461                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
8462                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8463                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
8464                 </links>
8465         </class>
8466         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
8467                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
8468                         <field name="id" reporter:datatype="id" />
8469                         <field name="owner" reporter:datatype="link"/>
8470                         <field name="create_time" reporter:datatype="timestamp"/>
8471                         <field name="name" reporter:datatype="text"/>
8472                         <field name="data" reporter:datatype="text"/>
8473                         <field name="folder" reporter:datatype="link"/>
8474                         <field name="description" reporter:datatype="text"/>
8475                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8476                 </fields>
8477                 <links>
8478                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8479                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
8480                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
8481                 </links>
8482         </class>
8483         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
8484                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
8485                         <field name="id" reporter:datatype="id" />
8486                         <field name="owner" reporter:datatype="link"/>
8487                         <field name="create_time" reporter:datatype="timestamp"/>
8488                         <field name="template" reporter:datatype="link"/>
8489                         <field name="data" reporter:datatype="text"/>
8490                         <field name="folder" reporter:datatype="link"/>
8491                         <field name="recur" reporter:datatype="bool"/>
8492                         <field name="recurrence" reporter:datatype="interval"/>
8493                         <field name="name" reporter:datatype="text"/>
8494                         <field name="description" reporter:datatype="text"/>
8495                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
8496                 </fields>
8497                 <links>
8498                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8499                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
8500                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
8501                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
8502                 </links>
8503         </class>
8504         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
8505                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
8506                         <field name="id" reporter:datatype="id" />
8507                         <field name="runner" reporter:datatype="link"/>
8508                         <field name="start_time" reporter:datatype="timestamp"/>
8509                         <field name="complete_time" reporter:datatype="timestamp"/>
8510                         <field name="run_time" reporter:datatype="timestamp"/>
8511                         <field name="email" reporter:datatype="text"/>
8512                         <field name="excel_format" reporter:datatype="bool"/>
8513                         <field name="csv_format" reporter:datatype="bool"/>
8514                         <field name="html_format" reporter:datatype="bool"/>
8515                         <field name="error_code" reporter:datatype="int"/>
8516                         <field name="error_text" reporter:datatype="text"/>
8517                         <field name="report" reporter:datatype="link"/>
8518                         <field name="folder" reporter:datatype="link"/>
8519                         <field name="chart_pie" reporter:datatype="bool"/>
8520                         <field name="chart_bar" reporter:datatype="bool"/>
8521                         <field name="chart_line" reporter:datatype="bool"/>
8522                 </fields>
8523                 <links>
8524                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
8525                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
8526                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
8527                 </links>
8528         </class>
8529         <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">
8530                 <fields oils_persist:primary="id">
8531                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8532                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8533                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8534                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8535                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8536                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8537                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8538                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8539                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8540                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8541                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8542                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8543                 </fields>
8544                 <links>
8545                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8546                 </links>
8547                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8548                         <actions>
8549                                 <retrieve />
8550                         </actions>
8551                 </permacrud>
8552         </class>
8553         <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">
8554                 <fields oils_persist:primary="id">
8555                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8556                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8557                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8558                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8559                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8560                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8561                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8562                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8563                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8564                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8565                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8566                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8567                 </fields>
8568                 <links>
8569                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8570                 </links>
8571         </class>
8572         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
8573                 <fields oils_persist:primary="id">
8574                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8575                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
8576                         <field reporter:label="Fingerprint" name="fingerprint" />
8577                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8578                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8579                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8580                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8581                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
8582                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8583                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8584                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8585                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
8586                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
8587                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
8588                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8589                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8590                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
8591                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
8592                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
8593                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
8594                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
8595                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
8596                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8597                 </fields>
8598                 <links>
8599                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
8600                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8601                 </links>
8602         </class>
8603         <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">
8604                 <fields oils_persist:primary="id">
8605                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
8606                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
8607                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
8608                 </fields>
8609                 <links>
8610                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
8611                 </links>
8612         </class>
8613         <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">
8614                 <fields oils_persist:primary="id">
8615                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
8616                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
8617                 </fields>
8618                 <links>
8619                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
8620                 </links>
8621         </class>
8622         <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">
8623                 <fields oils_persist:primary="id">
8624                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
8625                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
8626                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
8627                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
8628                 </fields>
8629                 <links>
8630                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
8631                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
8632                 </links>
8633         </class>
8634         <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">
8635                 <fields oils_persist:primary="xact">
8636                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8637                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
8638                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
8639                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
8640                 </fields>
8641                 <links>
8642                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8643                 </links>
8644         </class>
8645         <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">
8646                 <fields oils_persist:primary="xact">
8647                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8648                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
8649                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
8650                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
8651                 </fields>
8652                 <links>
8653                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8654                 </links>
8655         </class>
8656         <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)">
8657                 <fields oils_persist:primary="id">
8658                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
8659                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
8660                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
8661                 </fields>
8662                 <links>
8663                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8664                 </links>
8665         </class>
8666         <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">
8667                 <fields oils_persist:primary="id">
8668                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
8669                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
8670                 </fields>
8671                 <links>
8672                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
8673                 </links>
8674         </class>
8675         <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">
8676                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
8677                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
8678                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
8679                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
8680                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
8681                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
8682                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
8683                 </fields>
8684                 <links>
8685                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8686                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
8687                 </links>
8688                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8689                         <actions>
8690                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8691                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8692                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8693                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8694                         </actions>
8695                 </permacrud>
8696         </class>
8697         <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">
8698                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
8699                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
8700                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
8701                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
8702                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8703                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8704                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
8705                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8706                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
8707                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
8708                 </fields>
8709                 <links>
8710                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8711                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8712                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8713                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8714                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8715                 </links>
8716                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8717                         <actions>
8718                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
8719                                         <context link="formula" field="owner"/>
8720                                 </create>
8721                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
8722                                         <context link="formula" field="owner"/>
8723                                 </retrieve>
8724                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
8725                                         <context link="formula" field="owner"/>
8726                                 </update>
8727                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
8728                                         <context link="formula" field="owner"/>
8729                                 </delete>
8730                         </actions>
8731                 </permacrud>
8732         </class>
8733
8734         <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">
8735                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
8736                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8737                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8738                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8739                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
8740                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8741                 </fields>
8742                 <links>
8743                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8744                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8745                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8746                 </links>
8747                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8748                         <actions>
8749                                 <create permission="CREATE_PURCHASE_ORDER">
8750                                         <context link="formula" field="owner"/>
8751                 </create>
8752                                 <retrieve permission="CREATE_PURCHASE_ORDER">
8753                                         <context link="formula" field="owner"/>
8754                 </retrieve>
8755                                 <update permission="CREATE_PURCHASE_ORDER">
8756                                         <context link="formula" field="owner"/>
8757                 </update>
8758                                 <delete permission="CREATE_PURCHASE_ORDER">
8759                                         <context link="formula" field="owner"/>
8760                 </delete>
8761                         </actions>
8762                 </permacrud>
8763         </class>
8764
8765         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
8766                 <fields oils_persist:primary="id">
8767                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
8768                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8769                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
8770                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
8771                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
8772                 </fields>
8773                 <links>
8774                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8775                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8776                 </links>
8777         </class>
8778
8779         <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">
8780                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
8781                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8782                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8783                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8784                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8785                 </fields>
8786                 <links>
8787                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8788                 </links>
8789                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8790                         <actions>
8791                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8792                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8793                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8794                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8795                         </actions>
8796                 </permacrud>
8797         </class>
8798
8799         <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">
8800                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
8801                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8802                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8803                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8804                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8805                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
8806                 </fields>
8807                 <links>
8808                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8809                 </links>
8810                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8811                         <actions>
8812                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8813                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8814                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8815                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8816                         </actions>
8817                 </permacrud>
8818         </class>
8819
8820         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
8821                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
8822                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8823                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8824                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8825                 </fields>
8826                 <links>
8827                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8828                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8829                 </links>
8830         </class>
8831
8832         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
8833                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
8834                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8835                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8836                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8837                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8838                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8839                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8840                 </fields>
8841                 <links>
8842                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8843                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
8844                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8845                 </links>
8846         </class>
8847
8848         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
8849                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
8850                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8851                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8852                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
8853                 </fields>
8854                 <links>
8855                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8856                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
8857                 </links>
8858         </class>
8859
8860         <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">
8861                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
8862                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8863                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8864                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8865                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8866                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8867                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8868                 </fields>
8869                 <links>
8870                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8871                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
8872                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8873                 </links>
8874         </class>
8875
8876         <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">
8877                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
8878                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
8879                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8880                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
8881                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8882                 </fields>
8883                 <links>
8884                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8885                 </links>
8886                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8887             <actions>
8888                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8889                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
8890                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8891                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8892             </actions>
8893                 </permacrud>
8894         </class>
8895
8896         <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">
8897                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
8898                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
8899                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
8900                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
8901                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
8902                 </fields>
8903                 <links>
8904                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8905                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
8906                 </links>
8907                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8908                         <actions>
8909                                 <create permission="ADMIN_CLAIM_POLICY">
8910                                         <context link="claim_policy" field="org_unit"/>
8911                 </create>
8912                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
8913                                         <context link="claim_policy" field="org_unit"/>
8914                 </retrieve>
8915                                 <update permission="ADMIN_CLAIM_POLICY">
8916                                         <context link="claim_policy" field="org_unit"/>
8917                 </update>
8918                                 <delete permission="ADMIN_CLAIM_POLICY">
8919                                         <context link="claim_policy" field="org_unit"/>
8920                 </delete>
8921                         </actions>
8922                 </permacrud>
8923         </class>
8924
8925     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
8926         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
8927             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8928             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8929             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8930             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
8931             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
8932             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
8933             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
8934             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
8935             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
8936             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
8937             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
8938             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
8939             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
8940             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
8941             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8942         </fields>
8943     </class>
8944
8945     <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">
8946         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
8947             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8948             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8949             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8950             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8951             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8952         </fields>
8953     </class>
8954
8955     <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">
8956         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
8957             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8958             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8959             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8960             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8961             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8962             <field reporter:label="City" name="city" reporter:datatype="text"/>
8963             <field reporter:label="State" name="state" reporter:datatype="text"/>
8964             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8965             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8966             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8967         </fields>
8968     </class>
8969
8970     <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">
8971         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
8972             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8973             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8974             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8975             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8976             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8977             <field reporter:label="City" name="city" reporter:datatype="text"/>
8978             <field reporter:label="State" name="state" reporter:datatype="text"/>
8979             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8980             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8981             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8982         </fields>
8983     </class>
8984
8985     <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">
8986         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
8987             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8988             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8989             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8990             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
8991             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
8992             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8993         </fields>
8994     </class>
8995
8996         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
8997                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
8998                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
8999                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9000                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9001                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
9002                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
9003                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
9004                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
9005                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
9006                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
9007                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
9008                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
9009                 </fields>
9010                 <links>
9011                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9012                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9013                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9014                 </links>
9015         </class>
9016
9017         <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">
9018                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
9019                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
9020                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
9021                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
9022                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
9023                 </fields>
9024                 <links>
9025                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
9026                 </links>
9027         </class>
9028
9029     <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">
9030         <fields>
9031             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9032             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9033             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9034         </fields>
9035                 <links>
9036                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9037                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9038                 </links>
9039     </class>
9040
9041     <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">
9042         <fields>
9043             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9044             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
9045         </fields>
9046                 <links>
9047                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9048                 </links>
9049     </class>
9050
9051     <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">
9052         <fields>
9053             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9054             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9055             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9056         </fields>
9057                 <links>
9058                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9059                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9060                 </links>
9061     </class>
9062
9063     <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">
9064         <fields>
9065             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9066             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
9067         </fields>
9068                 <links>
9069                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9070                 </links>
9071     </class>
9072
9073     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
9074                 <oils_persist:source_definition>
9075
9076             SELECT  DISTINCT l.*
9077               FROM  action.unfulfilled_hold_loops l
9078                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
9079               WHERE l.count = m.max
9080
9081                 </oils_persist:source_definition>
9082         <fields>
9083             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9084             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9085             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9086         </fields>
9087                 <links>
9088                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9089                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9090                 </links>
9091     </class>
9092
9093         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
9094                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
9095                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
9096                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
9097                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
9098                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
9099                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
9100                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
9101                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
9102                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
9103                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
9104                 </fields>
9105                 <links>
9106                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
9107                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
9108                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
9109                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
9110                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
9111                 </links>
9112         </class>
9113
9114         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
9115                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
9116                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
9117                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
9118                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9119                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
9120                 </fields>
9121                 <links>
9122                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
9123                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
9124                 </links>
9125         </class>
9126
9127         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
9128                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
9129                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
9130                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
9131                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
9132                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
9133                 </fields>
9134                 <links>
9135                 </links>
9136         </class>
9137
9138         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
9139                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
9140                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
9141                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
9142                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9143                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
9144                 </fields>
9145                 <links>
9146                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
9147                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
9148                 </links>
9149         </class>
9150         
9151         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
9152                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
9153                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
9154                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
9155                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
9156                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
9157                 </fields>
9158                 <links>
9159                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
9160                 </links>
9161         </class>
9162         
9163         <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">
9164                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
9165                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
9166                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9167                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9168                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
9169                 </fields>
9170                 <links>
9171                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9172                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
9173                 </links>
9174         </class>
9175
9176         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
9177                 <fields oils_persist:primary="name">
9178                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
9179                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9180                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
9181                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9182                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
9183                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
9184                 </fields>
9185                 <links>
9186                 </links>
9187         </class>
9188
9189         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
9190                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9191                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9192                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
9193                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9194                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9195                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9196                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9197                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9198                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9199                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9200                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9201                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9202                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9203                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9204                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9205                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9206                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9207                 </fields>
9208                 <links>
9209                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9210                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9211                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9212                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9213                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9214                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9215                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9216                 </links>
9217         </class>
9218
9219         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9220                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9221                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9222                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9223                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9224                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9225                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9226                 </fields>
9227                 <links>
9228                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9229                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9230                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9231                 </links>
9232         </class>
9233
9234         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
9235                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
9236                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
9237                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
9238                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
9239                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
9240                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
9241                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
9242                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9243                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
9244                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9245                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
9246                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
9247                 </fields>
9248                 <links>
9249                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9250                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
9251                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
9252                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
9253                 </links>
9254         </class>
9255
9256         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
9257                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
9258                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
9259                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
9260                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9261                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9262                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
9263                 </fields>
9264                 <links>
9265                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
9266                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
9267                 </links>
9268         </class>
9269
9270         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
9271                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
9272                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
9273                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9274                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9275                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9276                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
9277                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
9278                 </fields>
9279                 <links>
9280                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9281                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9282                 </links>
9283         </class>
9284
9285         <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">
9286                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9287                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9288                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9289                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9290                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9291                 </fields>
9292                 <links>
9293                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9294                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9295                 </links>
9296         </class>
9297
9298         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9299                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9300                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9301                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9302                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9303                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9304                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9305                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9306                 </fields>
9307                 <links>
9308                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9309                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9310                 </links>
9311         </class>
9312
9313         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
9314                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9315                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9316                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9317                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9318                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9319                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9320                 </fields>
9321                 <links>
9322                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9323                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9324                 </links>
9325         </class>
9326
9327         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
9328                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9329                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9330                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9331                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9332                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9333                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9334                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9335                 </fields>
9336                 <links>
9337                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9338                 </links>
9339         </class>
9340
9341         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9342                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9343                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9344                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9345                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9346                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9347                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9348                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9349                 </fields>
9350                 <links>
9351                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9352                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9353                 </links>
9354         </class>
9355
9356         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9357                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9358                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9359                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9360                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9361                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9362                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9363                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9364                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9365                 </fields>
9366                 <links>
9367                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9368                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9369                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9370                 </links>
9371         </class>
9372
9373         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9374                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9375                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9376                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9377                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9378                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9379                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9380                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9381                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9382                 </fields>
9383                 <links>
9384                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9385                 </links>
9386         </class>
9387
9388         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
9389                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9390                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9391                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9392                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9393                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9394                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9395                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9396                 </fields>
9397                 <links>
9398                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9399                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9400                 </links>
9401         </class>
9402
9403         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
9404                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9405                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9406                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9407                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9408                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9409                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9410                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9411                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9412                 </fields>
9413                 <links>
9414                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9415                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9416                 </links>
9417         </class>
9418
9419         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
9420                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9421                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9422                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9423                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9424                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9425                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9426                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9427                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9428                 </fields>
9429                 <links>
9430                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9431                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9432                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9433                 </links>
9434         </class>
9435
9436         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
9437                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9438                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9439                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9440                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9441                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9442                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9443                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9444                 </fields>
9445                 <links>
9446                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9447                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9448                 </links>
9449         </class>
9450
9451         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
9452                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9453                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9454                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9455                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9456                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9457                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9458                 </fields>
9459                 <links>
9460                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9461                 </links>
9462         </class>
9463
9464         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
9465                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9466                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9467                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9468                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9469                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9470                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9471                 </fields>
9472                 <links>
9473                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9474                 </links>
9475         </class>
9476
9477         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
9478                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9479                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9480                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9481                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9482                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9483                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9484                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9485                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9486                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9487                 </fields>
9488                 <links>
9489                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9490                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9491                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9492                 </links>
9493         </class>
9494
9495         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
9496                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9497                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9498                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9499                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9500                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9501                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9502                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9503                 </fields>
9504                 <links>
9505                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9506                 </links>
9507         </class>
9508
9509         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
9510                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9511                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9512                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9513                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9514                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9515                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9516                 </fields>
9517                 <links>
9518                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9519                 </links>
9520         </class>
9521
9522         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
9523                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9524                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9525                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9526                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9527                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9528                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9529                 </fields>
9530                 <links>
9531                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9532                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9533                 </links>
9534         </class>
9535
9536         <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">
9537                 <fields oils_persist:primary="id">
9538                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
9539                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
9540                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
9541                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
9542                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
9543                 </fields>
9544                 <links>
9545                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
9546                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9547                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
9548                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
9549                 </links>
9550         </class>
9551
9552         <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">
9553                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
9554                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9555                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
9556                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9557                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
9558                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9559                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9560                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
9561                 </fields>
9562                 <links/>
9563                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9564                         <actions>
9565                                 <retrieve/>
9566                         </actions>
9567                 </permacrud>
9568         </class>
9569
9570         <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">
9571                 <fields oils_persist:primary="ptype_key">
9572                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
9573                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9574                 </fields>
9575                 <links/>
9576                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9577                         <actions>
9578                                 <retrieve/>
9579                         </actions>
9580                 </permacrud>
9581         </class>
9582
9583         <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">
9584                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
9585                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9586                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
9587                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9588                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9589                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9590                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9591                 </fields>
9592                 <links>
9593                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
9594                 </links>
9595                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9596                         <actions>
9597                                 <retrieve/>
9598                         </actions>
9599                 </permacrud>
9600         </class>
9601
9602         <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">
9603                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
9604                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9605                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
9606                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
9607                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9608                 </fields>
9609                 <links>
9610                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9611                 </links>
9612                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9613                         <actions>
9614                                 <retrieve/>
9615                         </actions>
9616                 </permacrud>
9617         </class>
9618
9619     <class
9620         id="uvs"
9621         controller="open-ils.cstore open-ils.pcrud"
9622         oils_obj:fieldmapper="url_verify::session"
9623         oils_persist:tablename="url_verify.session"
9624         reporter:label="URL Verification Session"
9625     >
9626         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
9627             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
9628             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9629                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
9630             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
9631             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
9632             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9633             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
9634             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
9635             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
9636         </fields>
9637
9638         <links>
9639             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9640             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9641             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
9642             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
9643             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
9644         </links>
9645
9646         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9647             <actions>
9648                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
9649             </actions>
9650         </permacrud>
9651
9652     </class>
9653
9654     <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">
9655         <oils_persist:source_definition>
9656             SELECT
9657                 cbrebi.id AS id,  -- so we can have a pkey in our view
9658                 uvs.id AS session,
9659                 uvs.owning_lib,
9660                 cbrebi.target_biblio_record_entry
9661             FROM url_verify.session uvs
9662             JOIN container.biblio_record_entry_bucket cbreb
9663                 ON (uvs.container = cbreb.id)
9664             JOIN container.biblio_record_entry_bucket_item cbrebi
9665                 ON (cbrebi.bucket = cbreb.id)
9666         </oils_persist:source_definition>
9667         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
9668             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
9669             <field reporter:label="Session" name="session" reporter:datatype="link" />
9670             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9671             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
9672         </fields>
9673         <links>
9674             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
9675             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
9676             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
9677         </links>
9678         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9679             <actions>
9680                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
9681             </actions>
9682         </permacrud>
9683     </class>
9684
9685     <class
9686         id="uvus"
9687         controller="open-ils.cstore open-ils.pcrud"
9688         oils_obj:fieldmapper="url_verify::url_selector"
9689         oils_persist:tablename="url_verify.url_selector"
9690         reporter:label="URL Verification URL Selector"
9691     >
9692         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
9693             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
9694             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
9695                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
9696             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
9697         </fields>
9698
9699         <links>
9700             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9701             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
9702         </links>
9703
9704         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9705             <actions>
9706                 <create permission="URL_VERIFY">
9707                     <context link="session" field="owning_lib"/>
9708                 </create>
9709                 <retrieve permission="URL_VERIFY">
9710                     <context link="session" field="owning_lib"/>
9711                 </retrieve>
9712                 <update permission="URL_VERIFY">
9713                     <context link="session" field="owning_lib"/>
9714                 </update>
9715                 <delete permission="URL_VERIFY">
9716                     <context link="session" field="owning_lib"/>
9717                 </delete>
9718             </actions>
9719         </permacrud>
9720
9721     </class>
9722
9723     <class
9724         id="uvu"
9725         controller="open-ils.cstore open-ils.pcrud"
9726         oils_obj:fieldmapper="url_verify::url"
9727         oils_persist:tablename="url_verify.url"
9728         reporter:label="URL Verification URL"
9729     >
9730         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
9731             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
9732                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
9733                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
9734                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
9735                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
9736             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9737             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9738             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
9739             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
9740             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
9741             <field reporter:label="Host" name="host" reporter:datatype="text"/>
9742             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
9743             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
9744             <field reporter:label="Path" name="path" reporter:datatype="text"/>
9745             <field reporter:label="Page" name="page" reporter:datatype="text"/>
9746             <field reporter:label="Query" name="query" reporter:datatype="text"/>
9747             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
9748             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
9749         </fields>
9750
9751         <links>
9752             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
9753             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
9754             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9755             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
9756             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
9757         </links>
9758
9759         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9760             <actions>
9761                 <create permission="URL_VERIFY">
9762                     <context link="session" field="owning_lib"/>
9763                 </create>
9764                 <retrieve permission="URL_VERIFY">
9765                     <context link="session" field="owning_lib"/>
9766                 </retrieve>
9767                 <update permission="URL_VERIFY">
9768                     <context link="session" field="owning_lib"/>
9769                 </update>
9770                 <delete permission="URL_VERIFY">
9771                     <context link="session" field="owning_lib"/>
9772                 </delete>
9773             </actions>
9774         </permacrud>
9775
9776     </class>
9777
9778     <class
9779         id="uvva"
9780         controller="open-ils.cstore open-ils.pcrud"
9781         oils_obj:fieldmapper="url_verify::verification_attempt"
9782         oils_persist:tablename="url_verify.verification_attempt"
9783         reporter:label="URL Verification Attempt"
9784     >
9785         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
9786             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
9787                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
9788                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
9789             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
9790             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
9791         </fields>
9792
9793         <links>
9794             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9795             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9796         </links>
9797
9798         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9799             <actions>
9800                 <create permission="URL_VERIFY">
9801                     <context link="session" field="owning_lib"/>
9802                 </create>
9803                 <retrieve permission="URL_VERIFY">
9804                     <context link="session" field="owning_lib"/>
9805                 </retrieve>
9806                 <update permission="URL_VERIFY">
9807                     <context link="session" field="owning_lib"/>
9808                 </update>
9809                 <delete permission="URL_VERIFY">
9810                     <context link="session" field="owning_lib"/>
9811                 </delete>
9812             </actions>
9813         </permacrud>
9814
9815     </class>
9816
9817     <class
9818         id="uvuv"
9819         controller="open-ils.cstore open-ils.pcrud"
9820         oils_obj:fieldmapper="url_verify::url_verification"
9821         oils_persist:tablename="url_verify.url_verification"
9822         reporter:label="URL Verification"
9823     >
9824         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
9825             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
9826                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
9827                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
9828             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
9829             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
9830             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
9831             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
9832                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
9833         </fields>
9834
9835         <links>
9836             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
9837             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
9838             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
9839         </links>
9840
9841         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9842             <actions>
9843                 <create permission="URL_VERIFY">
9844                     <context link="attempt" jump="session" field="owning_lib"/>
9845                 </create>
9846                 <retrieve permission="URL_VERIFY">
9847                     <context link="attempt" jump="session" field="owning_lib"/>
9848                 </retrieve>
9849                 <update permission="URL_VERIFY">
9850                     <context link="attempt" jump="session" field="owning_lib"/>
9851                 </update>
9852                 <delete permission="URL_VERIFY">
9853                     <context link="attempt" jump="session" field="owning_lib"/>
9854                 </delete>
9855             </actions>
9856         </permacrud>
9857
9858     </class>
9859
9860         <class
9861                 id="cfdi"
9862                 controller="open-ils.cstore open-ils.pcrud"
9863                 oils_obj:fieldmapper="config::filter_dialog_interface"
9864                 oils_persist:tablename="config.filter_dialog_interface"
9865                 reporter:label="FilterDialog Interface">
9866                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
9867                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
9868                         <field reporter:label="Description" name="description" reporter:datatype="text" />
9869                 </fields>
9870                 <links>
9871                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
9872                 </links>
9873                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9874                         <actions>
9875                                 <retrieve />
9876                         </actions>
9877                 </permacrud>
9878         </class>
9879
9880         <class
9881                 id="cfdfs"
9882                 controller="open-ils.cstore open-ils.pcrud"
9883                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
9884                 oils_persist:tablename="config.filter_dialog_filter_set"
9885                 reporter:label="FilterDialog Filter Set">
9886                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
9887                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9888                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9889                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9890                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9891                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
9892                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9893                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
9894                 </fields>
9895                 <links>
9896                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9897                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9898                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
9899                 </links>
9900                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9901                         <actions>
9902                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9903                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9904                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9905                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9906                         </actions>
9907                 </permacrud>
9908
9909         </class>
9910
9911         <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">
9912                 <fields oils_persist:primary="code">
9913                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
9914                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
9915                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
9916                 </fields>
9917                 <links/>
9918                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9919                         <actions>
9920                                 <retrieve/>
9921                         </actions>
9922                 </permacrud>
9923         </class>
9924
9925         <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">
9926                 <oils_persist:source_definition>
9927
9928             SELECT  b.id,
9929                     MAX(dcp.edit_date) AS last_delete_date
9930              FROM   biblio.record_entry b
9931                     JOIN asset.call_number cn ON (cn.record = b.id)
9932                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
9933              WHERE  NOT b.deleted
9934              GROUP BY b.id
9935              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
9936
9937                 </oils_persist:source_definition>
9938                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9939                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
9940                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
9941                 </fields>
9942                 <links>
9943                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9944                 </links>
9945                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9946                         <actions>
9947                                 <retrieve/>
9948                         </actions>
9949                 </permacrud>
9950         </class>
9951
9952         <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">
9953                 <oils_persist:source_definition>
9954
9955             -- -- 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.
9956             -- -- 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
9957             -- -- may not.
9958             -- SELECT
9959             --     bre.id AS "bib_id",
9960             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
9961             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
9962             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
9963             -- FROM (
9964                 SELECT
9965                     y.bre AS "id",
9966                     COALESCE( x.copy_count, 0 ) AS "copy_count",
9967                     y.hold_count AS "hold_count",
9968                     (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"
9969                 FROM (
9970                         SELECT
9971                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
9972                             COUNT(*) AS "hold_count"
9973                         FROM action.hold_request h
9974                         WHERE
9975                             cancel_time IS NULL
9976                             AND fulfillment_time IS NULL
9977                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
9978                         GROUP BY 1
9979                     )y LEFT JOIN (
9980                         SELECT 
9981                             (SELECT id
9982                                 FROM biblio.record_entry 
9983                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
9984                             ) AS "bre", 
9985                             COUNT(*) AS "copy_count"
9986                         FROM asset.copy
9987                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
9988                         WHERE copy.holdable 
9989                             AND NOT copy.deleted 
9990                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
9991                         GROUP BY 1
9992                     )x ON x.bre = y.bre
9993                 -- )z RIGHT JOIN (
9994                 --     SELECT id
9995                 --     FROM biblio.record_entry
9996                 --     WHERE NOT deleted
9997                 -- )bre ON (z.bib_id = bre.id)
9998                 
9999
10000                 </oils_persist:source_definition>
10001                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10002                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10003                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
10004                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
10005                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
10006                 </fields>
10007                 <links>
10008                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10009                 </links>
10010                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10011                         <actions>
10012                                 <retrieve/>
10013                         </actions>
10014                 </permacrud>
10015         </class>
10016
10017         <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">
10018                 <oils_persist:source_definition>
10019             SELECT *,
10020                 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,
10021                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10022             FROM
10023                 (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
10024                     FROM
10025                         action.hold_request ahr
10026                         JOIN reporter.hold_request_record rhrr USING (id)
10027                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10028                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10029                     WHERE
10030                         ahr.cancel_time IS NULL
10031                         AND ahr.fulfillment_time IS NULL
10032                     GROUP BY bib_record, pickup_lib
10033                 )x
10034                 JOIN
10035                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10036                     FROM
10037                         action.hold_request ahr
10038                         JOIN reporter.hold_request_record rhrr USING (id)
10039                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10040                     WHERE
10041                         ahr.cancel_time IS NULL
10042                         AND ahr.fulfillment_time IS NULL
10043                     GROUP BY bib_record
10044                 )y
10045                 USING (id)
10046                 </oils_persist:source_definition>
10047                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10048                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10049                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
10050                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
10051                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
10052                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10053                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10054                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
10055                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10056                 </fields>
10057                 <links>
10058                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10059                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
10060                 </links>
10061                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10062                         <actions>
10063                                 <retrieve/>
10064                         </actions>
10065                 </permacrud>
10066         </class>
10067
10068         <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">
10069                 <oils_persist:source_definition>
10070             SELECT
10071                 ac.id,
10072                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
10073                 MAX(actac.xact_start) AS last_circ
10074             FROM asset.copy ac
10075                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10076             GROUP BY ac.id
10077
10078             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
10079             --SELECT
10080             --    ac.id,
10081             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
10082             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
10083             --FROM asset.copy ac
10084             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10085             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
10086             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
10087                 </oils_persist:source_definition>
10088                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10089                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
10090                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
10091                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
10092                 </fields>
10093                 <links>
10094                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10095                 </links>
10096                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10097                         <actions>
10098                                 <retrieve/>
10099                         </actions>
10100                 </permacrud>
10101         </class>
10102
10103         <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">
10104                 <fields oils_persist:primary="id">
10105                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
10106                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
10107                 </fields>
10108                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10109                         <actions>
10110                                 <retrieve/>
10111                         </actions>
10112                 </permacrud>
10113         </class>
10114
10115         <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">
10116                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
10117                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10118                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
10119                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10120                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10121                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10122                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10123                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10124                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
10125                 </fields>
10126                 <links>
10127                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
10128                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10129                 </links>
10130                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10131                         <actions>
10132                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10133                                 <retrieve/>
10134                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10135                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10136                         </actions>
10137                 </permacrud>
10138         </class>
10139
10140         <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">
10141                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
10142                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10143                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
10144                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10145                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10146                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10147                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10148                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10149                 </fields>
10150                 <links>
10151                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
10152                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10153                 </links>
10154                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10155                         <actions>
10156                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10157                                 <retrieve/>
10158                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10159                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10160                         </actions>
10161                 </permacrud>
10162         </class>
10163
10164
10165         <!-- ********************************************************************************************************************* -->
10166         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
10167         <!-- ********************************************************************************************************************* -->
10168         <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">
10169                 <fields oils_persist:primary="id">
10170                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
10171                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
10172                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
10173                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10174                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
10175                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
10176                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10177                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
10178                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
10179                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
10180                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
10181                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
10182                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
10183                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
10184                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10185                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
10186                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
10187                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
10188                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
10189                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
10190                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
10191                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
10192                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
10193                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
10194                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
10195                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
10196                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
10197                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
10198                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
10199                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10200                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10201                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10202                 </fields>
10203                 <links>
10204                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10205                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
10206                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
10207                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
10208                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
10209                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
10210                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
10211                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
10212                 </links>
10213         </class>
10214
10215         <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">
10216                 <fields oils_persist:primary="id">
10217                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10218                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10219                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10220                 </fields>
10221                 <links>
10222                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10223                 </links>
10224         </class>
10225
10226         <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">
10227                 <fields oils_persist:primary="id">
10228                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10229                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10230                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10231                 </fields>
10232                 <links>
10233                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10234                 </links>
10235         </class>
10236
10237         <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">
10238                 <fields oils_persist:primary="id">
10239                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
10240
10241                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
10242                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
10243                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
10244
10245                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
10246                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
10247                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
10248
10249                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
10250                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
10251
10252                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10253                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
10254                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
10255
10256                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
10257                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
10258
10259                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
10260                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
10261                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
10262
10263                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
10264                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
10265                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
10266
10267                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10268                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
10269                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
10270                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
10271
10272                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
10273                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
10274
10275                 </fields>
10276                 <links>
10277                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
10278                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10279                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
10280                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
10281                 </links>
10282         </class>
10283
10284         <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">
10285                 <oils_persist:source_definition>
10286
10287             SELECT
10288                 po.ordering_agency AS ordering_agency,
10289                 po.id AS purchase_order,
10290                 li.id AS lineitem,
10291                 lid.id AS lineitem_detail,
10292                 cpa.id AS claim_policy_action
10293             FROM
10294                 acq.lineitem_detail lid
10295                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
10296                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
10297                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
10298                 JOIN acq.claim_policy_action cpa ON (
10299                     cpa.claim_policy = cp.id
10300
10301                     -- we only care about claim policy actions whose claim
10302                     -- interval we'd reached or exceeded
10303                     AND (NOW() - cpa.action_interval) &gt; po.order_date
10304
10305                     -- filter out all claim policy actions where claim events
10306                     -- have occurred on or after the action's action_interval
10307                     AND NOT EXISTS (
10308                         SELECT 1
10309                         FROM
10310                             acq.claim_event evt
10311                             JOIN acq.claim claim ON (
10312                                 claim.id = evt.claim
10313                                 AND claim.lineitem_detail = lid.id
10314                             )
10315                         WHERE
10316                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
10317                     )
10318                 )
10319             WHERE
10320                 lid.cancel_reason IS NULL
10321                 AND li.cancel_reason IS NULL -- belt/suspenders
10322                 AND po.cancel_reason IS NULL -- belt/suspenders
10323                 AND lid.recv_time IS NULL
10324                 AND po.state = 'on-order'
10325             ORDER BY 1, 2, 3, 4, 5
10326
10327                 </oils_persist:source_definition>
10328                 <fields>
10329                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10330                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10331                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10332                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10333                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
10334                 </fields>
10335                 <links>
10336                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10337                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10338                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10339                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10340                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
10341                 </links>
10342         </class>
10343         <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">
10344                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10345                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10346                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10347                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10348                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10349                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10350                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10351                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10352                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10353                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10354                 </fields>
10355                 <links>
10356                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10357                 </links>
10358     </class>
10359         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
10360                 <oils_persist:source_definition>
10361             SELECT * FROM acq.lineitem_summary 
10362                                 WHERE item_count > (invoice_count + cancel_count)
10363         </oils_persist:source_definition>
10364                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10365                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10366                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10367                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10368                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10369                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10370                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10371                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10372                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10373                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10374                 </fields>
10375                 <links>
10376                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10377                 </links>
10378     </class>
10379         <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">
10380                 <oils_persist:source_definition>
10381
10382                         SELECT  t.*
10383                           FROM  action.transit_copy t
10384                                 JOIN actor.org_unit AS s ON (t.source = s.id)
10385                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
10386                           WHERE s.parent_ou &lt;&gt; d.parent_ou
10387
10388                 </oils_persist:source_definition>
10389                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
10390                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
10391                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
10392                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
10393                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
10394                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
10395                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
10396                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
10397                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
10398                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
10399                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
10400                 </fields>
10401                 <links>
10402                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
10403                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
10404                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
10405                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
10406                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10407                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
10408                 </links>
10409         </class>
10410
10411     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
10412                 <oils_persist:source_definition>
10413
10414         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
10415                 SELECT
10416                         cp.id as copy,
10417                         COUNT(circ.id),
10418                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10419                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10420                 FROM
10421                         asset.copy cp
10422                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
10423                 GROUP BY 1, 3, 4
10424                 UNION
10425                 SELECT
10426                         cp.id as copy,
10427                         COUNT(circ.id),
10428                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10429                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10430                 FROM
10431                         asset.copy cp
10432                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
10433                 GROUP BY 1, 3, 4
10434                 UNION
10435                 SELECT
10436                         id as copy,
10437                         circ_count,
10438                         -1 AS year,
10439                         false as is_renewal
10440                 FROM
10441                         extend_reporter.legacy_circ_count
10442         )x GROUP BY 1, 3, 4
10443
10444                 </oils_persist:source_definition>
10445         <fields>
10446             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
10447             <field reporter:label="Count" name="count" reporter:datatype="int"/>
10448             <field reporter:label="Year" name="year" reporter:datatype="int"/>
10449             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
10450         </fields>
10451                 <links>
10452                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
10453                 </links>
10454                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10455                         <actions>
10456                                 <retrieve/>
10457                         </actions>
10458                 </permacrud>
10459     </class>
10460
10461         <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">
10462                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
10463                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
10464                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
10465                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
10466                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
10467                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
10468                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
10469                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
10470                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
10471                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
10472                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
10473                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
10474                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
10475                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
10476                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
10477                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
10478                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
10479                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
10480                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
10481                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
10482                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
10483                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
10484                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
10485                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
10486                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
10487                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
10488                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
10489                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
10490                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
10491                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
10492                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
10493                 </fields>
10494                 <links>
10495                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
10496                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
10497                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
10498                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10499                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
10500                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10501                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10502                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
10503                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
10504                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
10505                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
10506                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
10507                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
10508                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
10509                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
10510                 </links>
10511         </class>
10512
10513     <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">
10514         <fields oils_persist:primary="id">
10515             <field reporter:label="Title" name="title" reporter:datatype="text"/>
10516             <field reporter:label="Author" name="author" reporter:datatype="text"/>
10517             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
10518             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
10519             <field reporter:label="Price" name="price" reporter:datatype="money"/>
10520             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10521             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
10522             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
10523             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10524             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
10525             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10526             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
10527             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
10528             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
10529             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10530             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10531             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
10532             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
10533             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
10534             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
10535             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
10536             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
10537             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10538             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
10539             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
10540             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
10541             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
10542             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
10543             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
10544             <field reporter:label="Status" name="status" reporter:datatype="link"/>
10545             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
10546             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
10547             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
10548             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
10549         </fields>
10550         <links>
10551             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10552             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10553             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10554             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
10555             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
10556         </links>
10557     </class>
10558
10559     <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">
10560         <fields oils_persist:primary="id">
10561             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10562             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10563             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10564             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10565         </fields>
10566         <links>
10567             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10568             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10569         </links>
10570     </class>
10571
10572     <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">
10573         <fields oils_persist:primary="owning_lib">
10574             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10575             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10576             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10577         </fields>
10578         <links>
10579             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10580         </links>
10581     </class>
10582
10583     <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">
10584         <fields oils_persist:primary="id">
10585             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10586             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10587             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10588             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10589             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10590         </fields>
10591         <links>
10592             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10593             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10594             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10595         </links>
10596     </class>
10597
10598     <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">
10599         <fields oils_persist:primary="circ_lib">
10600             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10601             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10602             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10603             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10604         </fields>
10605         <links>
10606             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10607             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10608         </links>
10609     </class>
10610
10611     <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">
10612         <fields oils_persist:primary="id">
10613             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10614             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10615             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10616             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10617             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10618         </fields>
10619         <links>
10620             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10621             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10622             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10623         </links>
10624     </class>
10625
10626     <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">
10627         <fields oils_persist:primary="home_ou">
10628             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10629             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10630             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10631             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10632         </fields>
10633         <links>
10634             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10635             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10636         </links>
10637     </class>
10638         <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">
10639                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
10640                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
10641                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
10642                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
10643                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
10644                 </fields>
10645                 <links>
10646                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10647                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
10648                 </links>
10649                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10650                         <actions>
10651                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10652                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
10653                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10654                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10655                         </actions>
10656                 </permacrud>
10657         </class>
10658         <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">
10659                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
10660                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
10661                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
10662                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
10663                 </fields>
10664                 <links>
10665                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10666                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
10667                         </links>
10668                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10669                 <actions>
10670                                 <create permission="ADMIN_ACQ_FUND_TAG">
10671                                         <context link="tag" field="owner"/>
10672                                 </create>
10673                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
10674                                         <context link="tag" field="owner"/>
10675                                 </retrieve>
10676                                 <update permission="ADMIN_ACQ_FUND_TAG">
10677                                         <context link="tag" field="owner"/>
10678                                 </update>
10679                                 <delete permission="ADMIN_ACQ_FUND_TAG">
10680                                         <context link="tag" field="owner"/>
10681                                 </delete>
10682                         </actions>
10683                 </permacrud>
10684         </class>
10685         <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">
10686                 <oils_persist:source_definition><![CDATA[
10687                 SELECT
10688                         poi.purchase_order AS purchase_order,
10689                         ii.invoice AS invoice,
10690                         NULL AS lineitem,
10691                         poi.id AS po_item,
10692                         NULL AS picklist
10693                 FROM
10694                         acq.po_item poi
10695                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
10696                 UNION SELECT
10697                         jub.purchase_order AS purchase_order,
10698                         ie.invoice AS invoice,
10699                         jub.id AS lineitem,
10700                         NULL AS po_item,
10701                         jub.picklist AS picklist
10702                 FROM
10703                         acq.lineitem jub
10704                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
10705                 UNION SELECT
10706                         ii.purchase_order AS purchase_order,
10707                         ii.invoice AS invoice,
10708                         NULL AS lineitem,
10709                         NULL AS po_item,
10710                         NULL AS picklist
10711                 FROM
10712                         acq.invoice_item ii
10713                 WHERE ii.po_item IS NULL
10714                 UNION SELECT
10715                         ie.purchase_order AS purchase_order,
10716                         ie.invoice AS invoice,
10717                         NULL AS lineitem,
10718                         NULL AS po_item,
10719                         NULL AS picklist
10720                 FROM
10721                         acq.invoice_entry ie
10722                 WHERE ie.lineitem IS NULL
10723                 UNION SELECT
10724                         NULL AS purchase_order,
10725                         NULL AS invoice,
10726                         jub.id AS lineitem,
10727                         NULL AS po_item,
10728                         jub.picklist AS picklist
10729                 FROM
10730                         acq.lineitem jub
10731                 WHERE jub.purchase_order IS NULL
10732                 ]]></oils_persist:source_definition>
10733                 <fields>
10734                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
10735                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
10736                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
10737                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
10738                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
10739                 </fields>
10740                 <links>
10741                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
10742                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
10743                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
10744                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
10745                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
10746                 </links>
10747         </class>
10748         <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">
10749                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
10750                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10751                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
10752                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
10753                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
10754                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
10755                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10756                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
10757                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
10758                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
10759                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
10760                 </fields>
10761                 <links>
10762                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10763                 </links>
10764                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10765                         <actions>
10766                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10767                                 <retrieve/>
10768                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10769                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10770                         </actions>
10771                 </permacrud>
10772         </class>
10773
10774         <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">
10775                 <fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
10776                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10777                         <field name="date_applied" reporter:datatype="timestamp"/>
10778                         <field name="org" reporter:datatype="org_unit"/>
10779                         <field name="original_value" reporter:datatype="text"/>
10780                         <field name="new_value" reporter:datatype="text"/>
10781                         <field name="field_name" reporter:datatype="link"/>
10782                 </fields>
10783                 <links>
10784                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
10785                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
10786                 </links>
10787                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10788                         <actions>
10789                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
10790                                 <retrieve/>
10791                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10792                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10793                         </actions>
10794                 </permacrud>
10795         </class>
10796         <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">
10797                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10798                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10799                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10800                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10801                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10802                 </fields>
10803                 <links>
10804                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10805                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
10806                 </links>
10807         </class>
10808         <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">
10809                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10810                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10811                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10812                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10813                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10814                 </fields>
10815                 <links>
10816                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10817                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
10818                 </links>
10819         </class>
10820
10821
10822         <!-- ********************************************************************************************************************* -->
10823
10824 </IDL>
10825
10826 <!--
10827     vim:noet:ts=4:sw=4:
10828 -->